3 ms·
And still I haven't seen any language more Object-Oriented than SmallTalk. Sure, Python, C++, Java, etc. support OO to some level. But in SmallTalk everything l
by behnamoh 7y ago
And still I haven't seen any language more Object-Oriented than SmallTalk. Sure, Python, C++, Java, etc. support OO to some level. But in SmallTalk everything literally is an object, which means you can achieve the same functionality of Lisp macros in SmallTalk as well. In Lisp you have data = code, in SmallTalk you have data = program (which is running). In fact, everything is always running in SmallTalk. I'm more than eager to learn more and more about SmallTalk. It's one of those languages with valuable philosophy behind its design (just like Lisp and Haskell).
- scroot 7y agoIf you haven't yet, I'd recommend reading the "Blue Book" (Smalltalk-80: The Language and its Implementation) by Goldberg. It has a very holistic approach and, as such, is one of the most accessible and pleasant books describing a computing/programing environment one can find.
- behnamoh 7y agoThanks, I'll take a look at it!
- thequux 7y agoI also recommend reading http://www.mirandabanda.org/bluebook/bluebook_imp_toc.html http://www.mirandabanda.org/bluebook/bluebook_imp_toc.html once you're done with the blue book; the VM is a two weekend project in any compiled high-level language (I used Rust) and it's not hard to make it performant enough for real use. I think my timeline was ~2 days for the initial implementation, 2 days for fixing up small bugs (mostly in primitives), and then 2-3 hours of minor tweaks to get the VM performant enough to be comfortable. BTW, somebody typed the VM source in from the blue book and posted it online. You may find the resources on that page useful: http://www.wolczko.com/st80/ http://www.wolczko.com/st80/
- scroot 7y agoThis is dope -- didn't know about it, thanks
- lioeters 7y agoI wanted to add to this great recommendation. The blue book and other excellent out-of-print books on SmallTalk can be found here: http://stephane.ducasse.free.fr/FreeBooks/ http://stephane.ducasse.free.fr/FreeBooks/
- yellowapple 7y ago> But in SmallTalk everything literally is an object, which means you can achieve the same functionality of Lisp macros in SmallTalk as well. Ruby follows in SmallTalk's footsteps and implements something similar, at least to an extent.
- kazinator 7y agoEverything is a class object in Common Lisp. [1]> (class-of (cons 1 2)) #<BUILT-IN-CLASS CONS> [2]> (class-of #\x) #<BUILT-IN-CLASS CHARACTER> [3]> (class-of nil) #<BUILT-IN-CLASS NULL> [4]> (class-of (function mapcar)) #<BUILT-IN-CLASS FUNCTION>
- astrange 7y agoIt's more useful to think of SmallTalk as message-based than object-based. Messages are underrated, but objects are just function calls except the first parameter is on the left. > in SmallTalk you have data = program (which is running) Isn't it just an eagerly-evaluated language with closures? Can it walk its own AST?