[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Has Lua reached perfection?
- From: Dirk Laurie <dirk.laurie@...>
- Date: Sun, 28 Jan 2018 11:36:15 +0200
2018-01-28 10:52 GMT+02:00 KHMan <email@example.com>:
> I'd like a native switch. :-) Please, pretty pretty please :-)
So which do you want? Like Pascal's 'case' statement 
or like C's 'switch' statement?
Personally I heartily detest the C 'switch'. You need to put
'break' all over the place. I never use the fall-through trick.
It's a fast-track to lurking bugs.
I am willing to keep an open mind on 'case'. I don't
really think Lua needs it, but the workarounds are not pretty.
 I was a Pascal user from Wirth's first report until one
needed p2c to run it under Linux. Now that Free Pascal
has reached stability, I use Pacal again. Think of it as
C with Lua readability. One can write Lua API code in
Pascal and call Lua code from Pascal.