On Friday, 24 May 2013 22:43:59 UTC+2, José Valim wrote:
> Right - but it breaks the principle of least astonishment and doesn't play nicely with traditional makefiles etc,
The least astonishment to whom? It changes from person to person, depending on their background. It is impossible to design a language that is not going to break this principle for any particular group of people. Even if Elixir was just a command line calculator using binary operators, those used with Reverse Polish Notation would still be astonished...
For me - I'm astonished :-)
However, you are right. It does break makefiles and but that's hardly a concern in Elixir. In Elixir, a developer will use the Mix tool (in the same scope as rebar) to manage their projects and files. It also compiles files in parallel and, more importantly, it also automatically solves dependencies in between the files. Having macros means that modules are going to depend on each other at compilation time and all those dependencies would have to be properly sorted in any Makefile attempt.
I don't know about mix - what is it? - I typically build things using
erlang, c, bash scripts node.js, javascript etc. Makefiles are pretty universal and language neural
(ie equally bad at all languages)
Large numbers of languages use the principle OneSource x Compile = One OutputFile with
a different file extension.
One input file -> many outputfiles with many different names rather surprises me.
Id actually like no input files and no output files (like smalltalk) bit that's a different
discussion.