10 ms·
I think any new programming language should have a "why?" section on their page. I mean obviously this language is serving a need, but what is it? In any case,
by dkarras 6y ago
I think any new programming language should have a "why?" section on their page. I mean obviously this language is serving a need, but what is it? In any case, congrats! I like the features and would like to give it a try some day. I'm still curious about the motivations of this particular language though. Anyone more familiar care to elaborate a bit?
Edit: Ok, looks like there is a "why" section on github!
- mathgladiator 6y agoI started this with my documentation because I am still convincing myself that it is a good idea. http://www.adama-lang.org/docs/why-the-origin-story http://www.adama-lang.org/docs/why-the-origin-story
- syspec 6y agoWhich is exactly why you shouldn't do worry about why until later.
- mathgladiator 6y agoI'd argue it's vital to front-load the why question; before you can lead an effort you must believe yourself. The importance of asking why is that you validate whether a project is some ego trip or a legitimate finding worth pursuing.
- Trasmatta 6y agoThey "why" is basically having a language with the aesthetics and usability of Ruby, but fully statically typed with global type inference, and impressive performance. The downside being a relatively slow compiler. It's the necessary trade-off for the type inference.
- elviejo 6y agothank you! this summary is enough for me to try it!
- deleted 6y ago[deleted]
- Thaxll 6y agoThe "downside" you forgot to mention a lot of important things: - tooling is abyssmal ( IDE etc ... ) - no mutli threading - no real support, I'm not even sure if there is one paid guy anymnore on the project - it's still immature - they break the API all the time
- haolez 6y agoBesides funding (and maybe multithreading), I'd say that every new language will suffer from these limitations. They are difficult to avoid.
- ibraheemdev 6y agoIt is a relatively new language, all of the points you listed are expected. The last one should be taken care of now that they released 1.0.
- gravypod 6y ago> - tooling is abyssmal ( IDE etc ... ) As others have mentioned this is a side effect of how young it is. > - no real support, I'm not even sure if there is one paid guy anymnore on the project If paid support is all that counts then most languages would fall into that. > - it's still immature Tautological. Nothing can become mature without first being immature. > - they break the API all the time Isn't that what a 1.x is for? A stable major version?
- offtop5 6y ago>If paid support is all that counts then most languages would fall into that. Can you name another recent programming language that wasn't developed in-house at a major company. Go , Dart , and Rust all started out with paid teams of programmers working on them. Not sure if Crystal will be able to progress at a rate fast enough to keep people interested. Likewise, you'd have to be insane to try and pitch this to your project manager. I consider myself to be a risk taker, but even for my own side projects I stick to older better known programming languages. it feels like we keep trying to solve the same problems over and over again instead of utilizing solutions which already exist
- dkarras 6y agoSee, when you add "performance" to those properties it piques my interest. I'd love me a high performance language that is sanely typed, allows for metaprogramming, feels like an interpreted language while doing so etc. However the main page says absolutely nothing about performance. I even don't care about compile times. So what is the performance like?
- Trasmatta 6y agoYou can find some benchmarks here: https://github.com/kostya/benchmarks https://github.com/kostya/benchmarks With the caveat of course being that benchmarks don't always reflect real world performance.
- _joel 6y agoAlso Crystal based web frameworks tested here (key: Cry) same caveat as above. https://www.techempower.com/benchmarks/ https://www.techempower.com/benchmarks/
- weatherlight 6y agoIt's at least on par with Go, for solving similar problems, micro benchmarks, etc.
- Zababa 6y ago> The downside being a relatively slow compiler. It's the necessary trade-off for the type inference. I'm curious about that, MLs usually have fast compilers (OCaml for example) and have type inference. I thought that the slow compilation times were due to LLVM .
- Trasmatta 6y agoCrystal's type inference is more powerful than most other languages. Maybe the most powerful of any fully statically typed language? (I would love to hear of any others that have taken the same approach as Crystal.) You can almost write Crystal like a dynamically typed language, and yet everything is still fully statically typed. I believe you can speed up your compile times a bit by being explicit with annotations (which I often prefer anyway), but there's still a lot of overhead for the global type inference.
- fishmaster 6y ago> Maybe the most powerful of any fully statically typed language? Compared to Haskell, Ocaml, Scala, F#, ...? Writing it like a dynamically typed language is standard for full type inference.
- asterite 6y agoThose functional languages don't have function overloading or named arguments. The type inference in Crystal works very differently. The type of a method can only be computed from explicit calls to it. In those functional languages the type can be computed independent of a call because it's trivial to do so if a function name always refers to a single entity.
- Zababa 6y ago> Those functional languages don't have function overloading or named arguments. Scala has both, F# too (though function overloading is possible, I think it's not idiomatic), OCaml has named arguments, Haskell has overloading.
- coldtea 6y ago>I think any new programming language should have a "why?" section on their page. It's right here: https://github.com/crystal-lang/crystal https://github.com/crystal-lang/crystal
- hootbootscoot 6y agoHTTP is a first class member of the standard library, along with bcrypt, JSON, and a host of other useful stuff? https://crystal-lang.org/api https://crystal-lang.org/api This is a sweet spot for anything web-server related (which is quite a lot, these days, considering mobile API's and such...) I would actually hesitate to use a framework for many use cases, although Amber and Lucky are competing for a "soup-to-nuts" total platform, Kemal fills the Sinatra/Express niche nicely, and you really find yourself wondering what you want. The "shards" module system is very nice, and no external tool is needed, it comes with Crystal. No need for a C FFI, you can directly wrap the C ABI or C libraries and call both ways (from C to Crystal, from Crystal to C) It's not Rust nor C nor C++ but more like a better Go, in terms of being a statically typed compiled language that, nonetheless, is garbage-collected (everything is an object, check the API docs I linked above) but it's syntax is like Ruby, and so it' basically eats Elixer and all that's lunch... (Lucky takes on Phoenix, Amber takes on Rails? lol) It's also extremely fast, and the memory footprint is tiny... (anecdotal, but a 40kloc that was around 500mb ram on node is currently using 12mb) The compiler catches many errors and long-running applications don't apparently leak memory (cough cough anything dynamic) and one has the feeling that the static typing is allowing stack-frames scoping and Boehm to play nicely together, but this is just anecdotal. I guess you have one way to find out "Why Crystal" Let's not HackerNews Bikeshed this to death... go try it... you'll probably like it. Tooling? I use gedit, so I'm the wrong guy to ask. It works fine on most "ruby" presets for text coloration/highlighting whatever you call that stuff...
- blacksmoke16 6y agoThere's also https://athenaframework.org https://athenaframework.org, which takes its inspiration from more of a Spring/Symfony based approach. Brings some new ideas & unique features into the space mostly dominated by Rubyesque frameworks.
- jedisct1 6y agoNot sure that Crystal is considered a “new” programming language.
- canadianfella 6y agoThis isn’t new