Make packages independent of directory structure #5430
Replies: 1 comment
-
From the FAQ: https://odin-lang.org/docs/faq/#why-does-odin-not-have-any-extra-namespacing-feature-alongside-packages
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
Currently a package is defined as a directory of Odin code files.
This makes it impossible to organize Odin files into folders for organizational purposes only.
I know that a lot of folks who program in Odin don't have a problem with this and exclusively navigate their code by symbol search.
However, I personally would much prefer it if I could organize Odin files into directories to my heart's content.
I'm not satisfied with being limited to navigate large code bases by symbol search only.
This is where I feel the programming language is making my life more difficult without good reason.
It's the only factor that's keeping me from using Odin over C++ for large projects.
I propose that packages be defined by the package declaration at the top of files e.g.
package main
, regardless of file location.Afaik this change would not break backwards compatibility.
Beta Was this translation helpful? Give feedback.
All reactions