ngs-lang / ngs

Next Generation Shell (NGS)
https://ngs-lang.org/
GNU General Public License v3.0
1.41k stars 43 forks source link

Support "global type T" #474

Open ilyash opened 2 years ago

ilyash commented 2 years ago

... instead of current

global T
type T
antonio-pedro99 commented 1 year ago

Could you elaborate more on this?

ilyash-b commented 1 year ago

When declaring a type inside a namespace or a function, to make that type global one needs to use two separate statements:

global T
type T

This is purely syntactic limitation. The shorthand for this should be global type T.

antonio-pedro99 commented 1 year ago

I am learning about their implementation right now, I might decide go ahead with this