Live data from Hacker News

If-statements in Smalltalk (2008)

pozorvlak.livejournal.com

1–10 of 51 posts

Re: If-statements in Smalltalk (2008)

#4
post #2

Date: 2008

Do you think it's now invalid? Do you think anything has changed? I'd be interested to hear of any news that you think would update this.

Not at all, and that's why I upvoted it.

I mentioned the date because it is traditional in titles. Here it might put comparisons to ES9 and complaints about display on the iPhone 10s in context (I'm optimistic). Pessimistically, it might give fair warning that hyperlinks from the page 404.

Re: If-statements in Smalltalk (2008)

#6
First, I did not know this, it's pretty cool.

But, for all the fangled cool things that the more powerful languages of yesteryears (like lisp), what seems to actually precipitate adoption is simply history, not necessarily expressiveness/powerful abstractions, etc. See C, sh and friends, javascript. Arguably, python is one where its ease made it popular and it continues to develop language wise, albeit not without controversy.

Re: If-statements in Smalltalk (2008)

#7
The explanation is almost correct, but misses a tiny, but interesting detail. Subclasses of Boolean do implement #ifTrue: and #ifFalse:, wich each take a block (a no-argument function) as an argument. But they also implement #ifTrue:ifFalse:, which takes two blocks as arguments. In

    a 
a single message (#ifTrue:ifFalse:) is sent to the boolean that results from evaluating 'a Coming from Pascal and C, seeing that IF/ELSE could be implement without special syntax was a real mind warper.

Re: If-statements in Smalltalk (2008)

#9

First, I did not know this, it's pretty cool. But, for all the fangled cool things that the more powerful languages of yesteryears (like lisp), what seems to actually precipitate adoption is simply history, not necessarily expressiveness/powerful abstractions, etc. See C, sh and friends, javascript. Arguably, python is one where its ease made it popular and it continues to develop language wise, albeit not without co…

> Arguably, python is one where its ease made it popular and it continues to develop language wise, albeit not without controversy.

Currently about 7K lines into a python project and I'm getting more used to it but 'leaky abstractions' is a term that springs to mind at least 10 times per day if not more.

I'm busy with tricky array type conversions to feed stuff from one library into another a lot more than I would expect. Rather than that there is 'one way to do it' it seems there are about 50 of them, all incompatible with each other. Very messy at times.

Re: If-statements in Smalltalk (2008)

#10
This applies to loops as well. Numbers are objects that accept the `timesRepeat:` message:

    10 timesRepeat: [ n := n*2 ].
Not only that, you can send messages to blocks, to implement loops.

    [ n 
Post reply on HN