[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Suggestion: names-isolation-statement
- From: Sergey Kovalev <kovserg33@...>
- Date: Mon, 15 Jul 2019 19:46:22 +0300
I patched lua 5.4. it has new syntax for pure functions.
https://pastebin.com/7CHqFk7a
So if you want to experiment you may try it: (ps: pastebin replace \n
to \r\n so dos2unix need to fix it)
wget https://pastebin.com/raw/7CHqFk7a -O- | dos2unix > build-pure-functions.sh
bash build-pure-functions.sh
Usage example:
fn=function(x) print(x) end -- normal function
fn=function(x,G) pure G.print(x) end -- pure function. with out access
to upvalues and globals
fn(10,_G)
пт, 12 июл. 2019 г. в 00:16, Egor Skriptunoff <egor.skriptunoff@gmail.com>:
>
> A new syntax:
> with white-list-of-names do
> ....
> end