Improvement to switch-case statement

Benji Smith dlanguage at benjismith.net
Fri Jan 2 18:34:08 PST 2009


Yigal Chripun wrote:
> Maybe it's just me but all those C-style statements seem so arcane and 
> unnessaccary. real OOP languages do not need control structures to be 
> part of the language - they're part of the class library instead.
> Here's some Smalltalk examples: (and D-like comparable code)

Interesting...

Assuming the core language had no control structures, how would library 
authors implement them?

If the language itself lacked IF, ELSE, SWITCH, CASE, DO, WHILE, FOR, 
and presumably GOTO... how exactly would you go about implementing them 
in a library?

--benji



More information about the Digitalmars-d mailing list