On 10 March 2012 00:33, Eliot Miranda <eliot.miranda@gmail.com> wrote:
On Fri, Mar 9, 2012 at 3:02 PM, Igor Stasenko <siguctua@gmail.com> wrote:
According to this guy, we're using 3rd most powful programming language (or, well one of 4.. to not insult anyone ;).
http://www.paulgraham.com/icad.html
So, we're not that bad, eh? :)
I like what he says about patterns:
"If you try to solve a hard problem, the question is not whether you will use a powerful enough language, but whether you will (a) use a powerful language, (b) write a de facto interpreter for one, or (c) yourself become a human compiler for one. We see this already begining to happen in the Python example, where we are in effect simulating the code that a compiler would generate to implement a lexical variable.
This practice is not only common, but institutionalized. For example, in the OO world you hear a good deal about "patterns". I wonder if these patterns are not sometimes evidence of case (c), the human compiler, at work. When I see patterns in my programs, I consider it a sign of trouble. The shape of a program should reflect only the problem it needs to solve. Any other regularity in the code is a sign, to me at least, that I'm using abstractions that aren't powerful enough-- often that I'm generating by hand the expansions of some macro that I need to write."
Yeah.. in re: he says: I was actually surprised at how badly Python did. I had never realized, for example, that a Python lambda-expression couldn't contain the same things as a named function, or that variables from enclosing scopes are visible but not modifiable. Neither Lisp nor Perl nor Smalltalk nor Javascript impose either restriction. I can't see what advantage either restriction brings you. I can see how Python's gradual, ongoing (= incomplete) evolution would have produced them. So Occam's Razor implies that the latter is the reason Python is this way. I.e. these restrictions are bugs, not features.
A very good explanation to 'pointy-haired' why 'mainstream' language are not best choice.. as well as good illustration that in order to compete and stay popular, all mainstream languages will slowly converge to lisp.
-- Best regards, Igor Stasenko.
-- best, Eliot
-- Best regards, Igor Stasenko.