5 ms·
Can you name one language feature any of the three have which hasn't been around for decades?
by dschobel 17y ago
Can you name one language feature any of the three have which hasn't been around for decades?
- KirinDave 17y agoRuby's anonymous function syntax was pretty novel. I'm aware it was inspired by some syntax showed up in CLU, but it was fairly novel and remains a paragon of anonymous function syntax. Actually, enough so that you now see it showing up (although some claim this is a resurgence) in Lisp clones like Clojure and appearing in common Scheme macro packs. So while it was "around for decades" it was "around for decades in a marginalized and primitive form that Ruby helped to popularlize and make mainstream." In any event, this moratorium is stupid. Python already suffers from a paucity of modern language features under the aegis of "they are too complex." But it seems only hardcore Pythonistas seem to really feel this way, as the vast majority of other peer languages are–at the very least–adopting and embracing real lambdas and the elegant collection manipulation that follows from their reasoned use.
- llimllib 17y ago> Ruby's anonymous function syntax was pretty novel Ruby: {|x| x+1} Smalltalk: [:x | x+1] What am I missing?
- KirinDave 17y agoIt would help if your example was syntactically correct Ruby. (EDIT: I see you fixed it) And I meant novel in that it brought the notion into the dot-notation-happy world, where the majority of programmers lived and adapted it. Both Ruby an Smalltalk took the feature from a predecessor, as I understand it, and mentioning an also-ran like smalltalk slipped my mind. Does that weaken the point significantly? The feature is good and Python should finish integrating lambdas rather than sitting on their half-cocked nod to it. They cannot now Fo that for 2 years, maybe more.
- llimllib 17y agoI de-edited the end of my comment, because of weird time-related issues. > The feature is good and Python should finish integrating lambdas rather than sitting on their half-cocked nod to it. They cannot now for 2 years, maybe more. It's hard to "finish" a thing that hasn't started. Python has a whole aesthetic, and multi-line lambdas will likely never be a part of it. It's really quite a minor difference. I really think I'm not a zealot on the issue, and that I'm quite aware of the differences: http://billmill.org/multi_line_lambdas.html http://billmill.org/multi_line_lambdas.html ; what I'd like you to demonstrate is a place where giving a function a name is more than a minor inconvenience, and list comprehensions don't satisfy the need.
- viraptor 17y agoI'm sorry, but lambda notation was created around 193X and used for anonymous functions (in computer programming languages) in 197X. It's definitely not novel. People are simply rediscovering it now.
- draegtun 17y agoYes and "rediscovered" in the same way that every teenager thinks they are the first to discover sex!
- jrockway 17y agoYes.