4 ms·
I agree that Make's syntax isn't ideal, but JSON doesn't seem like a move in the right direction. If you're going to give Make a new syntax, why not pick a more
by wtetzner 10y ago
I agree that Make's syntax isn't ideal, but JSON doesn't seem like a move in the right direction. If you're going to give Make a new syntax, why not pick a more pleasant syntax?
- hood_syntax 10y agoCurious what you mean by pleasant. JSON is not really "pretty" but it is simple, and powerful imo. Is it the boilerplate that puts you off?
- padator 10y agoYou can use mk, the successor to make, which does not have the TAB requirement (you can use TAB or spaces interchangeably). Regarding JSON, it is more verbose than Make. You need to use quote around strings, commands, everything. Compare: foo.o: foo.c gcc -c foo.c with { 'foo.o' => ['foo.c'; 'gcc -c foo.c'] }
- wtetzner 10y agoYes, the issue is that build scripts are typically written and maintained by humans (as opposed to programs). A more pleasant syntax is one that would be easier to read and maintain. I think if you want a simple serialization format to replace Make's syntax, s-expressions would be a better fit.
- fizixer 10y agoWell, the way I see it, there are only 3 games in town: JSON-style variants (including YAML, arguably), XML, and S-expression variants. XML is definitely not better than JSON IMO. Are you hinting at either S-expression, or something like YAML? (For any other "custom syntax" we're better off sticking to make syntax itself)
- wtetzner 10y agoWell, your 3 games in town are serialization formats. They're great choices if you want tools to manipulate the build scripts. However, in my opinion, from your list only s-expressions make a reasonable syntax that a human would write an maintain. And, if you want that, well :) https://www.gnu.org/software/make/manual/html_node/Guile-Integration.html https://www.gnu.org/software/make/manual/html_node/Guile-Int...