3 ms·
> Then again, if I wanted OOP, I'd use C#. Which is not just reductionist, but downright silly. C# is not a very good OO language, in the same way Java isn't.
by masklinn 14y ago
> Then again, if I wanted OOP, I'd use C#.
Which is not just reductionist, but downright silly. C# is not a very good OO language, in the same way Java isn't.
When I want OOP, I play with Smalltalk. Or Self.
- eropple 14y ago> When I want OOP, I play with Smalltalk. Or Self. I'm reasonably sure there was an implicit "and be productive" in there. Smalltalk and Self are neat, but they don't do well on the get shit done test. (Yes, I know it is possible to get shit done in those. Compare the difficulty of getting-shit-done in them to an environment like Java or C#, and an unbiased source is going to have to admit they fail pretty hard if only because of stuff like Maven or, to a lesser extent, NuGet.)
- masklinn 14y ago> I'm reasonably sure there was an implicit "and be productive" in there. Right, let's move the goalposts and reduce the target, was there also the implicit assumption that the language should have a C-style syntax, be statically typed, run on a JITted runtime and be maintained by a big company?
- eropple 14y ago...or we can assume that the guy isn't an idiot and has selected C# as an object-oriented language for getting shit done. The only one who said "play" was you, and it makes sense because there's not really a lot of getting-shit-done using Smalltalk on modern systems. But he didn't say "play", he said "use", and a reasonable person might think that he said "use" because he has shit to get done. If hopping up and down and yelling about your pet likes when they don't really fit the topic is your bag, more power to you, but...
- masklinn 14y ago> ...or we can assume that the guy isn't an idiot No, I think we can exclude that one with no issue at all.
- recursive 14y agoWhat's right with smalltalk and self that's wrong with c# and java? This is a serious question asked out of a desire to learn the answer.
- masklinn 14y agoLower syntactic and semantic overhead, pretty much all of the language semantics are built from two properties/behaviors (and hooks into the interpreter): blocks and sending messages. Sending messages are method calls, the difference is mostly contextual. Blocks are first-class functions with closures and nonlocal returns. That part's important when you're trying to implement e.g. loops (otherwise you have to add flags or throw exceptions, as in Javascript). In Smalltalk, iteration is a message and a block: aCollection do: [item| "process item" ] but that's not exactly rare these days. On the other hand, a conditional is a message and two blocks: aBoolean ifTrue: [ "code if true" ] ifFalse: [ "code if false" ] A repeat loop is a message to a block on a block: [ "dynamic condition" ] whileTrue: [ "repeat while true" ] and so's a try/finally: [ "a piece of code which may blow up" ] ensure: [ "error recovery code" ] or a try/catch: [ "a piece of code which may blow up] on: SomeError do: [ :sig| "error handling" ] What this means is that there are very few special cases in the language, and the user of the language has the same power of expression as the designer of the language (much as in Lisps or Forths), the only limit is the hooks into the runtime but that's about it. Also, message cascading is a minor but way cool (and pretty much unique) feature of Smalltalk, it lets you have your cake (return interesting values from methods) and eat it too (chain calls): someObject aMessage ; anOtherMessage ; yetAnOther ; andOneMore will send all 4 messages to the same `someObject` no matter what the previous message returns. That tells you what the language's priorities are.