8 ms·
Smalltalk is a lovely, lovely language. It's fantastically simple --- it's got about four syntactic elements: you can call methods, you can declare and assign v
by david-given 11y ago
Smalltalk is a lovely, lovely language. It's fantastically simple --- it's got about four syntactic elements: you can call methods, you can declare and assign variables, you can create closures (called blocks in the Smalltalk world), and you can return from methods. That's about it. There's no control flow --- you do that through passing blocks into methods. You can learn the entire language in five minutes.
Of course, learning the library is another matter. But it's always depressed me that nearly forty years later, our high-tech and ultrafast dynamic languages still cannot hold a candle to Smalltalk for clarity, simplicity and usability.
(And the way that every time they invent a new feature, chances are Smalltalk had it in 1980. Better.)
- jasoncapriati 11y agoI'm intrigued. Can you point to a book or guide that expands this further, is beginner friendly and not 300 pages? Thanks!
- david-given 11y agoAmber has a really nice interactive tutorial: http://amber-lang.net/learn.html http://amber-lang.net/learn.html It's actually running in your browser, and the whole thing is a live coding environment in disguise. Well worth a play.
- rufugee 11y agoFirst thing I get when clicking "DoIt" in Chrome or Firefox is "Parse error on line 1 column 47 : Unexpected character null". Edit: turns out, I should've looked more closely. You're supposed to select particular text before pressing the button. If you do this it works. Still, they might want to consider a more friendly error message ;)
- david-given 11y agoI think what it's trying to tell you is that you haven't selected any text inside the edit window. (I agree it's a terrible error message.)
- dragonwriter 11y agoAlmost as terrible is the fact that the listed keyboard shortcut alternative to clicking DoIt (CTRL d) actually deletes, rather than executes, the selected text.
- aiiane 11y agoIn Chrome, at least, Ctrl+Shift+D works. So might be an implementation detail.
- sebastianconcpt 11y agoYou can also try SqueakJS https://bertfreudenberg.github.io/SqueakJS/ https://bertfreudenberg.github.io/SqueakJS/ It implemented Smalltalk primitives in JavaScript so it can run a real, bit identical, Squeak image.
- xrange 11y agoMaybe start with "Smalltalk 80: The Language", and just read the first three chapters: http://stephane.ducasse.free.fr/FreeBooks/BlueBook/Bluebook.pdf http://stephane.ducasse.free.fr/FreeBooks/BlueBook/Bluebook.... Also available for $1.89 (plus shipping) used from Amazon: http://www.amazon.com/Smalltalk-80-Language-Adele-Goldberg/dp/0201136880/ref=sr_1_1/176-5425998-4958107?ie=UTF8&qid=1440187645&sr=8-1&keywords=smalltalk http://www.amazon.com/Smalltalk-80-Language-Adele-Goldberg/d...
- igouy 11y agoThose are very dated and not really beginner friendly.
- deleted 11y ago[deleted]
- igouy 11y agoPerhaps "I Can Read C++ and Java But I Can’t Read Smalltalk" pdf 10 pages http://www.eli.sdsu.edu/courses/spring01/cs635/readingSmalltalk.pdf http://www.eli.sdsu.edu/courses/spring01/cs635/readingSmallt...
- wvenable 11y ago> Smalltalk is a lovely, lovely language. It's fantastically simple... learning the library is another matter. I think that's a fundamental issue. On the surface, Smalltalk seems very simple and easy to grasp but as you delve deeper and deeper it gets harder to follow and more magical. Examining how the underlying platform worked made my head spin. I went from a Smalltalk proponent to a detractor the more I learned about it and used it. I think that's the fundamental problem with every "simple" language; it just forces the complexity to spill out into another layer.
- threatofrain 11y agoThe simpler something is, the more you have to build yourself, though the likelihood is that you'll have to learn some library.
- coliveira 11y agoThat's a horrible reason to hate a language. Every language has layers of complexity. In C++ or Java the complexity is in the compiler, the library and the runtime. In Smalltalk it just happens that the layers are available to everyone to inspect. You are free to inspect or ignore it, but the complexity never really goes away even if you don't see it.
- agumonkey 11y agoSeems like it's a trait shared all these: FORTH, ST, Lisp. They're the logical machine right in your face. No strict classical lexer / parser / language / compiler / binary layering. It's very thin and hackable.
- ljw1001 11y agoHow is learning the library difficult? Or more difficult than learning libraries in any other language?
- incepted 11y ago> But it's always depressed me that nearly forty years later, our high-tech and ultrafast dynamic languages still cannot hold a candle to Smalltalk for clarity, simplicity and usability. You're aware that these are extremely subjective attributes, right? Most people not using Smalltalk (or who tried it and decided to not use it) will argue that Smalltalk is anything but clear, simple or even usable (seriously, even Pharos or Squeak have the usability of late 90s IDE's). And of course, there's the fact that Smalltalk is dynamically typed, a class of languages that's fast headed for extinction.
- AceJohnny2 11y ago> Smalltalk is dynamically typed, a class of languages that's fast headed for extinction. I'm going to go out on a limb here, and chalk that one up in the "famous last words" column. :)
- machinshin_ 11y agoI dunno, a lot of modern language academic research and push are going towards a very compile-time-typing-everywhere mode. see Haskell and Idris, for instance
- moonshinefe 11y ago... which are known to drive major trends in modern programming language usage? Sorry, not seeing your point.
- vidarh 11y agoAnd a huge proportion of language research gets ignored by the mainstream, so it's not a very useful indicator. For static typing to "win" (and though my favourite language these days is Ruby, I hope it does in the long run), it will need to become near transparent. If type inference is sufficiently advanced to avoid almost all type annotation, and the type system just gets out of your way 99% of the time, then yes, dynamically typed languages might be heading for extinction. But you'll have to wait a very long time for that, judging by the current crop of statically typed languages.