tag:blogger.com,1999:blog-6373963829340632529.post4832464293982281828..comments2024-01-30T05:40:30.415-03:00Comments on Algorithmically challenged: What does a Scala program looks like?Danielhttp://www.blogger.com/profile/07505997833685327219noreply@blogger.comBlogger1125tag:blogger.com,1999:blog-6373963829340632529.post-20738607725048985372009-10-02T18:44:30.412-03:002009-10-02T18:44:30.412-03:00I am mainly an OCaml programmer and this "no ...I am mainly an OCaml programmer and this "no standard style" pattern seems familiar to me.<br /><br />It's both a relief (not always the same bureaucratic code) and a plea. The worst side of it is fellow programmers telling your style is "hideous" because theirs is (possibly radically) different.<br /><br />This is not related to functional programming but rather to the multiparadigm approach. If you are an Haskell programmer then there is a "right way" of doing things. In Haskell what may vary is the abstraction level, yet the basic syntax flow seems rather consistent. With OCaml there are several ways of doing things plus an unrestricted freedom to mix the styles. <br /><br />About the convergence.<br />Will some superior style finally emerge ?<br />Definitely not. Never ever.<br />Scala and OCaml are about types, variety of styles comes from the richness of the type system.<br />Thus there is no superior styles because there is no inferior type.<br />The more consistent Haskell style comes from harsh decisions (POO is bad, mutability is evil,...) that Scala programmers will never even consider.<br />You have just to live with that plurality.<br />Unfortunately i agree it basically means Scala will never conquer industry, because the more you learn and experiment the less other competent programmers can understand your code at first sight. No matter how legible your code actually is, it seems obsfucated because it uses code patterns that are unknown to them.<br />That is a no-no for the software industry because most of the employers want you to be easily removable. They want any beginner to say "i can grasp this code" and let him live on and ruin the quality asset you have patiently build. Or at least they want you to believe they could do it.<br />Functional programming is quite different: if you touch a masterpiece code without knowing then you have to survive a massive attack of hard to decypher typing errors and the developpement is like frozen forever. Employers simply don't want good code that defend itself against the unattentive coders. Employers don't want you to code, they want you to type, and Java is excellent at that.Damien Guichardhttp://blog.developpez.com/damien-guichard/noreply@blogger.com