2 ms·
The passage is just clarifying the concept of goal-directed execution by comparison with the mainstream approach represented by Java, using a very standard exam
by pekk 11y ago
The passage is just clarifying the concept of goal-directed execution by comparison with the mainstream approach represented by Java, using a very standard example. There's nothing curious here, and there's no expository reason to start imposing additional requirements out of a suspicion that Java is being treated unfairly. Everyone knows Java is relatively verbose.
Icon isn't forcing the distinction of EOF from errors, but that doesn't mean Icon is incapable of expressing the distinction.
Whether it's more desirable or not, "while write(read())" is remarkably concise and looks simple. Also in Icon's favor, it's nice not to have to enumerate failure differences which are irrelevant to the situation. Everyone who ever complained about Java's checked exceptions knows what I mean.
My reservations are about whether the concise idiom will make more complex cases harder to understand. I'm troubled by the example's implication that Icon is designed to silence exceptions by default, which is bad practice in any language.