I remember the first contact with the computer, I was affected by two very large misconceptions, the concept was originally from the teacher's teaching or the teachings of the seniors have not been remembered, but until I worked a few years later, only slowly have a practical experience:
- Learning and using what programming language is not important, is the algorithm and design;
- The essence of programmer learning is the object-oriented design pattern, after mastering, follow.
It's just nonsense. It may be said in some extremely narrow context, but in generalities, such an attitude is undoubtedly fraught.
The first one, the programming language is not only important, but also too important. In other words, learning a new programming language may be learning the paradigm behind and the way you think about problems. If this part can bring new things, it is worth spending time on.
- groovy. Learning Groovy is a "dynamic language", and dynamic language is the "meta-programming" to go. "Dynamic" refers to the structure of the data type that can be changed during the program's operation. In other words, it is around the "meta-programming" characteristics. Meta-programming refers to changing the definition of "class" at run time, such as access, additions, or modifications, and so on. Word, is "program to write programs." Groovy is the closest dynamic language to Java. At the end of 07, a period of contact with groovy program, but also mixed with the groovy Chinese community of the owner, but I am so fond of thinking about things, is still not much active, in the latest tiobe ranked above , listed in 36 bits, interestingly, 35-bit is Scala, really same boat. Here's a little joke, groovy's author, James Strachan, said that if he had seen Scala, there wouldn't have been a groovy thing. Even with this dig-out, it seems that Scala's fate is nowhere to be seen. JavaScript is also a dynamic language, why touch groovy? One of the important reasons is that the meta-programming features are too rich.
- haskell. A purely functional language. This can be understood as "purely": there are some languages "can" function programming, but some are "have to" function-type programming. The two major trends of programming language development are dynamic language and functional language. So with groovy representing the dynamic language, I've always wanted to learn a functional language. Functional programming is like a function in mathematics, the only given input parameters, you can uniquely determine the output results, no context, no effect of the number of executions, or natural power, and so on. There are too many articles on the web. Haskell is too much of a college school, even the textbook to teach functional programming are used scheme (because it is easier to learn, not so complex type system), but the open view is undoubtedly very good ("The code can be written like this!") "), especially the pattern-matching feature.
There are, of course, other, representative languages that want to dig deeper, such as logical Prolog, and Perl that can write poetry ... But also afraid to eat too much will be held.
Haskell is to function, just like Perl's to a string, like Prolog to a puzzle, like groovy to a DSL.
I will record and discuss some of the language features, but will not discuss the likely important but trivial parts of most syntactic sugars. If it's just a pure study note that's boring, it's better to write it as a spit. I fought from Java and JavaScript to Haskell and groovy, and for these four languages, a feature is a feature-by-landscape comparison, such as standing at the angle of the type system, weak type, strong type, static, dynamic, relationship between types, type creation, and so on, for example, meta-programming, Java's reflection and proxy system, JavaScript's Prototype,groovy powerful meta-programming system, and Haskell's compile-time meta-programming implementation, and so on.