4 ms·
The other day I was browsing through computer books. One, on LINQ for VB, seemed very enthusiastic on this radical new technology Microsoft had brought out -- a
by cabalamat 16y ago
The other day I was browsing through computer books. One, on LINQ for VB, seemed very enthusiastic on this radical new technology Microsoft had brought out -- and the example they used to illustrate this was something Smalltalk had 30 years ago.
Incidently, Smalltalk isn't normally considered a functional programming language (do doubt because object orientation overshadowed it) but with its closures (called blocks) and select:, collect:, reject:, inject: etc methods it seems (to me) as much so as Scheme.
- kenjackson 16y agoWhich book?
- cabalamat 16y agoThis one: http://www.amazon.com/Pro-LINQ-Language-Integrated-Query/dp/1430216441/ref=sr_1_1?ie=UTF8&s=books&qid=1277320215&sr=8-1 http://www.amazon.com/Pro-LINQ-Language-Integrated-Query/dp/... The example on page 3 was: Dim greetings() As String = {"hello world", "hello LINQ", "hello Apress"} Dim items = _ From s In greetings _ Where s.EndsWith("LINQ") _ Select s Which In Smalltalk would be: greetings := #('hello world', 'hello LINQ', 'hello Apress'). items := greetings select: [:s | s endsWith: 'LINQ']. Needless to say I was not completely bowled over by this stunning Microsoft innovation.
- kenjackson 16y agoI don't think this one line is exactly where all the innovation is. But it is representative of getting your toe in the water. But this is the typical argument I hear from people about anything. "Hey, that was a good movie"... "Dude that plot is basically a derivative of Hamlet with a twist of Revelation, chapter 3. Nothing really new there". Or the most standard, "Actually you can do that with Lisp." I'm sure you probably know that everything in that Linq query is pure syntatic sugar. Not runtime changes needed. But with all that said, I'm sure MS didn't do this to be "innovative". At least I hope not. I assume they did it to make the lives of developers easier. That's the real test, not if no other language ever implemented the feature.
- cabalamat 16y ago> I assume they did it to make the lives of developers easier. I imagine you're right, and it's an entirely reasonable thing for MS to do. What I took exception to is the way the book spun it as an amazing new technology.
- kenjackson 16y agoI agree. The "has your world been shaken yet" (or whatever the line they use) was over the top. Unnecessary. For most users, the code speaks for itself.
- rbanffy 16y agoI always say that any aspiring programmer should read "Squeak by Example". Even if they end up never using Squeak (or Smalltalk), it will make them better programmers. Eric Raymond used to say the same thing about Lisp. I wholeheartedly agree. That said, I also like to annoy my fellow Java programmers by saying that Smalltalk 80 was more advanced than Java 2010.