5 ms·
I played with Ruby like 15 years ago and loved it, but surely speed wasn't exactly a selling point, so I welcome this project. One question though for the gurus
by squarefoot 9y ago
I played with Ruby like 15 years ago and loved it, but surely speed wasn't exactly a selling point, so I welcome this project.
One question though for the gurus out there: they say the compiler is written in Crystal; is it good practice to do it that soon? To me it could slow down development, if a subtle error occurs it could make harder to nail it to a bug in the compiler or in the language.
- relics443 9y agoThis is typical of new languages. A good showcase of dogfooding.
- skybrian 9y agoSure it's a little risky, but if you bootstrap from a stable, frozen version, it serves as a good integration test. There are still bugs, but if it compiles itself and the compiled version still passes all the tests, how bad can the bug be?
- ModernMech 9y agoBootstrapping your compiler is a vanity project for languages. It's cool to show you can do it, but pretty pointless in a practical sense unless your language is targeted at building compilers.
- pjmlp 9y agoIt is not vanity at all. It takes out of the table the typical argument that the language is not serious enough because it is written in C or something. The usual old time joke "my compiler compiles your language".
- ModernMech 9y agoNot all languages target C or C like workloads. Not all languages are particularly good at expressing parsers either. If your language is targeting e.g. Writing graphical visualizations, I don't see how writing compilers in the language serves anyone's interests except the language designer's.
- pjmlp 9y agoI agree if the language is something very specific like SQL, or an extension language to embedded as plugins. Otherwise any general purpose language, should be able to be used for all kinds of application, including compilers.
- cjhanks 9y agoAdditionally, writing a compiler really helps a team find their edge cases much faster. Without a major software undertaking for an immature language, most of those bugs would be found (and likely not reported) by users. But yeah, there's a little vanity too.
- ModernMech 9y agoSure writing a compiler can help there, but like I said, there are probably better ways to test that taking into account the design goals of the language. If you find that writing compilers is a pain in your language, but no one in your community is using your language to write compilers, are you going to invest resources in making your language better at writing compilers, or are you going to work on things important to your community?
- cjhanks 9y agoYeah, that's a good point. In the sense, RubyOnRails was a great blessing to the language.
- trengrj 9y agoI found it a bit weird too as introducing a cyclic binary dependency is definitely not best practice for a standard programming project. However the C compilers do the same thing and so you already have these types of cyclic binary dependencies and it is unfair to force all languages to be written in C.
- jsjohnst 9y ago> is it good practice to do it that soon? 1) How do you think most compiled languages were created back in their early days? 2) Crystal isn’t really that young of a language 3) even many non-compiled languages are run on an interpreter written in the language they implement these days.