lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


switch as a different construct  makes sense in C because a computed
jump is (much) faster than a chain of if() else if() ... .

It makes little or no sense in languages like lua or perl as they have
both associative arrays and variables can contain references to
subroutines. So syntactically the functionality can be archived by
other means. (see the example in previous mail)

BTW, I did not understand the sarcasm neither.

Luis

On 1/25/06, Walter Cruz <walter.php@gmail.com> wrote:
> Ben:
>
> Is switch much C-Like ?!
>
> (I don't write C code - I don't understand the sarcasm. Sorry.)
>
> :(
>
> []'s
> - Walter


--
This information is top security. When you have read it, destroy yourself.
-- Marshall McLuhan