3 ms·
and Smalltalk would be: Object setSlot:"foo" to:12. I have always liked Smalltalk's (via Objective-C) message syntax as it put the meaning of the function c
by protomyth 12y ago
and Smalltalk would be:
Object setSlot:"foo" to:12.
I have always liked Smalltalk's (via Objective-C) message syntax as it put the meaning of the function call slots where I am calling them. I hate what they've done in Swift however.
I have toyed with a scripting language that had:
Object.[setSlot:"foo" to:12]
Still not sure on that. I immensely respect the creator of Io but it didn't click with me (my fault, not the language).
- smosher_ 12y agoI think you misunderstand. The Smalltalk is this: exampleWithNumber: x "[ *wall-of-text elided* ]" | y | true & false not & (nil isNil) ifFalse: [self halt]. y := self size + super size. #($a #a "a" 1 1.0) do: [ :each | Transcript show: (each class name); show: ' ']. ^x < y I'm talking about an Io equivalent of the "Syntax In a Postcard" link provided above, partly reproduced here for convenience. What the code does isn't so important as how much of the syntax it covers.
- protomyth 12y agoOh, sorry, yes, I got your meaning totally wrong.