3 ms·
Isn't that a (built-in) package manager if it works for general packages? Or does it work only for selected dependencies?
by lifthrasiir 1y ago
Isn't that a (built-in) package manager if it works for general packages? Or does it work only for selected dependencies?
- Ygg2 1y agoFrom what I've seen. The Odin has three package collections: `base`, `core` and `vendor`. `base` is intrinsically necessary to port Odin. `core` seems to be its standard library, your `libc`, `xml`, etc. And `vendor` is everything else. So you basically get the Python's '`core` is where packages go to die' approach iff they take backwards compatibility seriously. Otherwise, they have breaking changes mid-language version change. EDIT: Package collections not packages per gingerBill.
- lifthrasiir 1y agoSo they are trying the Linux distribution model of packages, right? (Compare `vendor` with, say, Ubuntu's `universe`.)
- gingerBill 1y agoThose are library/package collections which contain multiple different packages, not the packages themselves. And we will take backwards compatibility seriously when we hit 1.0, and only "break" on major versions.
- Ygg2 1y ago> And we will take backwards compatibility seriously when we hit 1.0, and only "break" on major versions. I'm talking about post 1.0 language choices: - Choose backwards compatibility. Packages frozen in time, you get "Packages go to std to die." - Choose to break backwards compatibility. The ecosystem is split, some choose to go Odin 2 some are Odin 3.
- gingerBill 1y agoI already know all that, that's why we are being very conservative and slow when it comes to figuring out what is meant to be in 1.0.
- Ygg2 1y agoI don't think it will matter. There will be things people want that Odin won't have in the vendor package list. Then those people will have to manage dependencies, which is a hell on its own. Which will cause problems. Because people are super lazy so they will automate it. In the end only thing no package manager gets you is multiple package managers to juggle. Many languages started without package managers and eventually got them - Java, JavaScript, Python, C, C++
- gingerBill 1y agoAgain, I am not against third party packages, and manual management of dependencies just slows down your progression to hell. There is no "solution" to this problem, only trade-offs. I know people are lazy and will automate hell. That's the entire point of the article: not everything that can be automated ought to be automated. And the argument about multiple package managers to juggle is only the case IFF there are multiple competing ones, which with Odin, I honestly doubt it would happen if we enforced what a package is in the language. I just don't want to officially endorse one ever because I do view them to be evil. And I don't care many languages started without them, I am not going to give in.
- Ygg2 1y ago> I honestly doubt it would happen if we enforced what a package is in the language. I just don't want to officially endorse one ever because I do view them to be evil. I don't see how changing package definition is going to help. JS had no concept of package and it was bolted on with NPM. If Odin becomes big enough, the community will override the will of the author. Plus I don't see huge benefits to not having a package manager other than saving disk space. Security isn't that much meaningfully better than NPM. Trust problem exists regardless of package manager. And people aren't far to trusting, but far too lazy. And importing packages gets job done quickly.
- dismalaf 1y agoIt doesn't necessarily "manage" the packages. It just sees them in your project and compiles them. You manage them yourself.
- lifthrasiir 1y agoIf that's what happens, I think in the following claim: > Odin's compiler knows what a package is and will compile it into your program automatically. ...the word "automatically" should be dropped. Of course compilers compile any supplied dependency "automatically", but it is so obvious that we don't often use the adverb just for that.
- dismalaf 1y ago> Of course compilers compile any supplied dependency "automatically", but it is so obvious that we don't often use the adverb just for that. They often don't though. Rust, C, C++ need either long command line invocations or a build system for anything beyond hello world. Zig needs a build file for anything beyond hello world. With Odin, you just invoke "odin build ." and all your dependencies are taken in without needing a build system, build file, make file, etc...
- lifthrasiir 1y agoWe call that a build system. It is not like that there is no build system; you have an integrated build system that is optimized for typical situations. Which is great by its own, but other languages and toolings would have optimized other metrics (for example, you can't ignore Cargo when talking about Rust's build system) so it is not a fair comparison.
- gingerBill 1y agoIt is a build system in the technical sense but it's hard to explain to people because they expect it to be separate from the language entirely. If I said Odin had a build system, they'd be expecting an external build script. And when you say you don't need that, they usually get really confused. So how do you explain such a system to someone? This is a genuine question I am not sure how to answer.