Next up, he decided on the OCaml language. I said sure, no problem. I've heard about OCaml before, and I know very little about the language itself so I said sure. I built the compiler on my Gentoo box and happily ...
Prolog unification is more expressive than pattern matching as found in Scala, OCaml, etc. Both sides of a unification may contain variables; unification attempts to instantiate them so that the two sides are equal.
In Erlang (and in many other programming languages which include a functional subset), operations on purely functional data structures are frequently limited to O(log n) time complexity: there is no such thing as a true array with constant time access. No destructive updates. Nothing like pointers either. Because of this, you end up with a bunch of modules like array, dict, gb_trees and whatnot, which are all built either on lists or trees with varying branching factors. None of them do better than O(log n), and list-based solutions don't do better than O(n) (although they can average n/2.) There is, however, a class of data-structures that allow for amortized constant time for some operations: finger trees and zippers are examples of this.
Here are 10 one-liners which show the power of scala, impress your friends and woo women; ok, maybe not. However, these one liners are a good set of examples using functional programming and scala syntax you may not be familiar with. I feel there is no better way to learn than to see real examples.
here are a subset of algorithms and data structures that are very common, well-studied and very helpful. Examples of these are Topological sort, quicksort, depth-first search; on the other hand, dictionaries, trees, linked-lists and to a lesser extent red-black trees, and tries, are examples of the latter.
However, there are other algorithms and DS that are not mainstream (not easily found in books) that we have learned on our own, have become a useful tool, and we are proud of using because they were hidden... maybe we found it in a dark paper from the dawn of computation in the 60s and it is still useful today, or we just made them up (why not?). My pet one is binary decision diagrams (BDDs). What is yours?
In this article relational database experts David DeWitt and Michael Stonebraker compare MapReduce to traditional relational database systems (RDBMSs) and find MapReduce wanting. They make some strong points in favor or relational databases, but the comparison is not appropriate. When I finished reading the article I was thinking that the authors did not understand MapReduce or the idea of data in the cloud, or why programmers might be excited about non-RDBMS ways to manage data.
Alan Perlis said that “A language that doesnt change how you think about programming isnt worth knowing”. My favourite languages are Erlang, Python and C++ (and Lua, but these days Python is taking more of that market share).