jacylang / jacy

Jacy programming language
https://jacylang.github.io
13 stars 1 forks source link

Party mods with "redeclaration means addition" #2

Open hazer-hazer opened 3 years ago

hazer-hazer commented 3 years ago

Now, mods cannot be redeclared as they're just items as others (funcs, structs, etc.) Anyway, sometimes it can be convenient to "add" something to existent mod. I propose this syntax:

party mod a {
     func foo {}
}

party mod a {
     func bar {}
}

As a result, we got a one mod a which includes both func foo and func bar. This is pretty much like what C++ does.