Hacker News new | ask | show | jobs
by adamrezich 1063 days ago
what's encouraging you to conceive of the build system and the language as separate things? I never understood why most people making new languages seem to want to have each of these be distinct—why not just define the build using the same language?
2 comments

So there's differing views on this, Zig famously has the build system built in.

To me, having them separate forces you to keep things simple, because the build system can't communicate with the compiler except through compiler-provided interfaces.

Also, I think I like about languages like C, Rust, is that: if I wanted to, I could implement the build system without forking the compiler. In C specially because Make will print all the compiler invocations for you. It lets people build tooling that is not part of the compiler.

I think it's good from a simplicity perspective that language users can figure out what set of compiler invocations a build file "compiles down" to.

Realistically your provided build tool won't be everything. Cargo is enough to build my toy projects and even some fair size software written mostly in Rust, but it's not enough to build Mozilla, or Linux, or Android, or other large systems with a bunch of Rust in them - including Rust's own compiler and standard library.

But, when you get big enough to where this sort of provided tool isn't enough, chances are tooling is now somebody's actual problem anyway, if you're a for-profit somebody's job is to look after the tooling, you can invest in learning a specialized tool or even writing one because that's a proportionate effort, it makes sense.

For the same reason I want my TV and media player to be separate devices, instead of an all-in-one "smart" TV.
it's not that I don't understand the analogy part of your analogy... I just don't understand how these things are actually analogous in any way.