Akuli / jou

Yet another programming language
MIT License
11 stars 4 forks source link

Is it possible for us to add `from ... import ...` syntax? #416

Closed littlewhitecloud closed 7 months ago

Akuli commented 7 months ago

Jou had this and I didn't like it. It makes you think that you can define two functions with the same name in different files, if you don't import them both into the same file. That doesn't actually work, because they go to the same binary anyway: the executable would contain both of them with the same name. Basically, Jou's import behaves more like C's #include than Python's import, and I don't want to hide that.

We could magically rename the functions based on file name, e.g. function foo() in file bar.c could be named bar_foo() in the executable. But again, I don't want to add more magic to Jou.