Re: New Switch Idea
- Posted by mattlewis (admin) Mar 27, 2009
- 1116 views
Kat said...
I could swear that when i asked for ranges or match() in the case line, i was told it would be too slow, and was therefore rejected. Same for eval(). Yesterday even.
Yes, things like checking for less than, match(), or anything that isn't a discrete value to compare against is much more difficult. Something like 1,2,3 could be simply syntactic sugar for several case statements, and, at least from an implementation point of view, very different from the much less constrained things you had brought up.
Matt