[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Semicolons in Lua (was CppCon talk about Lua)
- From: Ulrich Schmidt <u.sch.zw@...>
- Date: Sun, 5 Nov 2017 10:26:23 +0100
Am 04.11.2017 um 21:18 schrieb Soni L.:
>
>
> On 2017-11-04 11:50 AM, Coda Highland wrote:
>> On Sat, Nov 4, 2017 at 11:34 AM, Martin
<eden_martin_fuhrspam@gmx.de> wrote:
>>> On 11/04/2017 01:23 PM, Soni L. wrote:
>>>> I understand what you're saying, but ; is the identity function.
>>>>
>>>> ;(x) is x.
>>>>
>>> Really? f(;, {;=;})
>>>
>> No, not REALLY. He was suggesting a way to think about it.
>>
>> /s/ Adam
>>
>
> They* but yes it was just a silly joke.
>
Back to topic: Andreas asked how to improve his talk. He try to get
people intrested in lua, people who are doing her dayly job in languages
like c, c++, java, ...
From my point of view there are 2 different kinds of lua users.
1. The users who grow with the lua language since version 1.
If i remember correctly. there was 1 statement per line and the
statement delimitter was the line end. There is nothing bad about that.
(I dont insert semicolons, when i write simple scripts to be executed
like batch files or shell scripts.)
But as lua grows, at some point, it was nesseary to implement a optional
statement delimitter. And there is nothing wrong with keeping old habits
not writing any staement delimitter until nessesary.
2. Lua users, like me, who lerned programming in other languages and
with lots of presumptions and habits in her head.
If you come from pascal, c, c++, .. you are trained to place statement
delimitters and you SEARCH automatically for statement delimitter in
sources you read.
For me ommiting semicolons in lua looks like basic. (I am not talking
about tiny lua shell scrips here)
As a member of Anderss's Auditorium and with a background like described
in 2.) it would be easier to me to read his examples if they contain
semicolons.
I am already happy, if you dont shoot me, when i use semicolons ;-)
Ulrich.