Live data from Hacker News

Crystal 1.0 – What to expect

crystal-lang.org

61–70 of 351 posts

Re: Crystal 1.0 – What to expect

#61
post #52

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!

They "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.

Re: Crystal 1.0 – What to expect

#62

I love the idea of Crystal but I remember reading that compilation times can balloon very quickly for moderately sized apps. Can anyone who writes Crystal today dispel or confirm that information? I imagine the inferred typing makes building a fast compiler really tough.

This comes from my experience building a prototype cli application, the language itself fells very productive, and the stdlib is robust fast and useful.

Compiling isn't fast. By the language design it won't ever be possible to be in the same ballpark as golang. It's common for us that our 5k lines app, take >1m to build in release mode as we added more and more dependencies for integrations with different nosql databases (elastic, rocksdb etc).

Using LLVM as backend is great for getting top notch performance, but to generate multiple IR methods for each type signature consumes a lot of time, especially when doing optimisation in release mode builds. I guess it's a similar problem that cranelift is trying to fix in Rust.

Open classes makes it hard to cache compilation results from dependencies / libraries.

Re: Crystal 1.0 – What to expect

#63
post #53

If curious, here are the significant past threads I found. Others? An Introduction to Crystal - https://news.ycombinator.com/item?id=26217013 - Feb 2021 (39 comments) Switch from Ruby to Crystal - https://news.ycombinator.com/item?id=25005780 - Nov 2020 (35 comments) Go vs. Crystal Performance - https://news.ycombinator.com/item?id=23615303 - June 2020 (160 comments) Ruby vs. Crystal Performance - https://news.ycombi…

Wow, this is a great compilation! While I'm not using Crystal, this is a great "marketing plan" for any new language.

Re: Crystal 1.0 – What to expect

#64
post #15

How does it compare to Nim?

Syntax wise: Nim is to python what Crystal is to Ruby

capability wise both are incredibly powerful genral purpose languages

For system language use, Nim is a better choice as you can use it with its Arc GC or no GC at all.

Perf wise, Crystal seems to be marginably faster in most benchmarks. Though at that level the difference isn't much.

crossplat wise, Crystal has no windows support while Nim has.

Tooling wise; crystal IDE tools are pretty far behind that of Nim.

Personally I like Crystal a lot due to its type system and syntax but you can't go wrong with either language.

Re: Crystal 1.0 – What to expect

#65
post #52

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!

They "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.

thank you! this summary is enough for me to try it!

Re: Crystal 1.0 – What to expect

#66
post #52

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!

They "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.

[deleted]

Re: Crystal 1.0 – What to expect

#67
Crystal is one of my most productive language for small project web oriented (Slack bot): a cleanup Ruby with added benefits (performance, type safety, null safety, proper concurrency).

My only complaints: * compilation speed * type inference is sometimes not intuitive (class members * too OOP oriented (no constness, no UFCS/pipeline, no general monad operator,...etc)

Re: Crystal 1.0 – What to expect

#68
post #52

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!

I 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

Which is exactly why you shouldn't do worry about why until later.

Re: Crystal 1.0 – What to expect

#69

Crystal is a beautiful language, however compiling times is something that put off most people who try it. How comes and they don't allow you to optionally provide types in your function/class signatures so you can help the compiler and speed up the whole process ? I mean global type inference is nice, but giving the option to specify types and speeding up the compiling time would be even more nice.

Rust also has a very slow compiler but I also see ex-rubyists using it?

Re: Crystal 1.0 – What to expect

#70
post #52

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!

They "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.

The "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

Post reply on HN