3 ms·
Io has no keywords; everything is a message. This includes return, break and continue.
by richcollins 17y ago
Io has no keywords; everything is a message. This includes return, break and continue.
- silentbicycle 17y agoYes, but late-binding everything is not free, or even always a clear win - it's a major language design trade-off, with implications for both performance and compile-time analysis. What happens to existing code if someone changes the meaning of 'return', for example?
- richcollins 17y agoYou catch changes in the meaning of return that break things because you write tests and monitor your processes (business and OS) so that you know when something goes wrong. I've never changed the meaning of return, but I easily added a new construct called returnIfError. Instead of having to type the following over and over: possibleError := attemptSomething if(possibleError, return(possibleError)) I can now type: trySomething returnIfError The power granted by quick iteration of ideas is almost always worth the performance and compile time analysis trade off for the things that I work on.