Better HN
topnewbestaskshowjobs
Log inSign up

fmateoc

5 karma · joined Feb 1, 2014 (12y ago) · 2 submissions

Submissions

comment 12y ago · link · parent

Just as an example, writing #( 1 2 3 4 5 ) + 5 would actually be even more compact and more intuitive. A Smalltalk developer would interpret this as #+ being implemented in Collection, and the expectation would be that the implementation of #+ would be something like

+ arg ^self collect: [:each | each + arg]

comment 12y ago · link · parent

I don't mind trying to come up with less boilerplate syntax, but how does the reader of the code know when something is a HOM or a normal message? The above example is valid syntax in existing Smalltalk, a Smalltalk developer would interpret it as collect returning a value that would be added to 5. I think this ambiguity is much worse than any advantage compactness might bring.