[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: explicit mode
- From: Ulrich Schmidt <u.sch.zw@...>
- Date: Tue, 10 May 2016 16:21:11 +0200
Am 10.05.2016 um 15:58 schrieb Viacheslav Usov:
On Tue, May 10, 2016 at 3:34 PM, steve donovan
<email@example.com <mailto:firstname.lastname@example.org>> wrote:
On Tue, May 10, 2016 at 3:27 PM, Viacheslav Usov <email@example.com
> Still: what speaks against implementing a new Lua compilation mode
> everything must be explicitly declared to be either local or
> anything not so declared would result in a compilation error?
Ah, but if it isn't backward-compatible, there's the inevitable
We will need some new syntax, invalid today, which will mean "past this
line, globals must be explicit". Because it is invalid today, it will
not break any existing code.
Meanwhile i like the untyped parameters. If i want variable parameters,
I throw the values in a table with named fields and hand over the table
to the subroutine. If i need to check the custom type of a value i use
oop/classes and check the class type. - works great and is much more
flexible than strict typing.
If i would need strict typing, i would use a different language.
It took some time to get familiar with the lua philosophy, but meanwhile
i like it. And i like the very conservative way, Roberto implement new
features - even he throw away my wishes. ;P