Wendicka / Scyndi

Experimental programming language
GNU General Public License v3.0
0 stars 0 forks source link

Properly work out variable parameters in Lua/JavaScript export #43

Open Tricky1975 opened 6 years ago

Tricky1975 commented 6 years ago

This will NOT be supported for functions that have to return a value. The only way to make this work in Lua is by translating:

    procedure var a b:string
        b:="hahaha"
    end

to

   function a(b)
      local br =b
      br="hahaha"
      return br 
   end

This can work in a procedure as no other values have to be returned.... In Lua however, this can be probelematic due to

    if myfunc(aaa) then

causing syntax errors if I need to return extra values due to aaa being variable.....

In other usage, I also need to work this out more properly... This is where Scyndi meets some serious constraints that may be hard to solve :-/

Tricky1975 commented 6 years ago

False closure