Hacker News new | ask | show | jobs
by atonse 1058 days ago
This is a good point because in elixir metaprogramming you can actually have some things happen at compile time. The frameworks use this for performance in a few places.

So if you had different behavior for ex and exs that would cause developer confusion.

1 comments

Yeah, if you don't want the code to run when you're compiling it, don't have it do anything until some function is called.

And it would be the same as in another language if you run a program that has no side effects. For instance "python abc.py" will gladly run a abc.py that is empty or has "class ABC: pass" in it.