Re: New Switch Idea

new topic     » goto parent     » topic index » view thread      » older message » newer message
Critic said...
mattlewis said...

The problem is that they are possibly too similar, especially to introduce into a language that's never had either.

Implement "select" then. Some users have already complained they don't want/understand fallthrough.

Yes, which is why we're discussing changing the current implementation of switch.

Critic said...
mattlewis said...

We have to consider the effect upon the user base. Euphoria has always been a fairly verbose language, and the with/without syntax goes along with that, including making the intended and expected behavior crystal clear.

Yes, EU is quite verbose already - don't make it worse! Fallthrough is not "crystal clear", it is a wierd concept that no other control statement uses.

Yes, no other control statement uses it. So what? No other control statement besides for uses 'by'. I understand that you disagree with fall through completely. That's fine. But Euphoria will have a switch with fall through, even though probably not as the default.

It's crystal clear in that a reader could not be confused as to whether the switch was using fall through or not. Obviously, that isn't meant to explain what fall through is.

Critic said...
mattlewis said...

Also, there's always a downside to adding keywords. And select is a common word, from GUI widgets and databases.

Provide a command line tool to rename an EU identifier. This will be very useful anyway and is not hard to do.

Yes, that would be useful. But it still doesn't remove the downside to adding keywords.

Matt

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu