Crystal: Provide `compile` as a replacement/alias for the `build` command

Created on 23 Mar 2015  路  9Comments  路  Source: crystal-lang/crystal

The help message uses "compile" ("compile program file") and most compilers typically have a c suffix or use -c or --compile.

newcomer accepted compiler

Most helpful comment

We had some internal discussions recently with @waj and @bcardiff and we are now not sure this was a good idea.

In compiled languages compile just means to compile, while build is more compile, link, generate an executable, etc. So build was probably more correct. And it's also shorter.

Since we are not 1.0 yet, we'd maybe like to revert this change. I think I rushed when I decided to accept this.

All 9 comments

I think this is a reasonable change

Just for clarification, because I'm thinking about taking this issue on, should crystal compile file.cr have the same behavior as crystal build file.cr or should it do something different?

it should be an alias really, for now. We can later think about phasing out/removing build.

Let's do the alias for now and recommend it as the way to compile.

So it would be great if you could update all docs to use it at the same time.

Can do!

We had some internal discussions recently with @waj and @bcardiff and we are now not sure this was a good idea.

In compiled languages compile just means to compile, while build is more compile, link, generate an executable, etc. So build was probably more correct. And it's also shorter.

Since we are not 1.0 yet, we'd maybe like to revert this change. I think I rushed when I decided to accept this.

I agree with reverting this. "Building" means producing the final result, where "compiling" is just one step of it. IDE's commonly have a "Build" button, for example.

As a reference: http://stackoverflow.com/questions/2310261/what-is-the-difference-between-compile-code-and-executable-code

gcc for instance by defaults builds an executable, and have an explicit -c (compile) option to only output the object code and skip linking.

So, +1 from me

I reverted the name change back to build. It was a mistake...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lgphp picture lgphp  路  3Comments

pbrusco picture pbrusco  路  3Comments

oprypin picture oprypin  路  3Comments

jhass picture jhass  路  3Comments

costajob picture costajob  路  3Comments