Live data from Hacker News

Crystal 1.0 – What to expect

crystal-lang.org

31–40 of 351 posts

Re: Crystal 1.0 – What to expect

#31
post #5

Really happy to see this go 1.0. Between Crystal and Zig it's nice to see C++/Rust get some competition

Would a developer looking a Zig/C++/Rust really also consider Crystal? I figured Crystal was for Ruby developers who want a good static type system.

Crystal comes from a Ruby background, but it's far more than compiled Ruby. As a general purpose language mainly aiming at application development it can surely compete with any of the above in that field. The main objective inherited from Ruby is the focus on developer hapiness. While doing that it doesn't back down on performance or interoparability.

Re: Crystal 1.0 – What to expect

#32
post #5

Really happy to see this go 1.0. Between Crystal and Zig it's nice to see C++/Rust get some competition

Would a developer looking a Zig/C++/Rust really also consider Crystal? I figured Crystal was for Ruby developers who want a good static type system.

Ruby is a great language, the only nits I have with it are error handling, types and a bit of the perlisms and shellisms that crept in. If Crystal fixed these I would be interested

Re: Crystal 1.0 – What to expect

#33
post #28

Huh - what's the last language that got mainstream adoption without backing from a large company? It almost seems impossible these days. Ruby?

Companies love opportunities for sponsorship to get promotion (and status) back. That means unless ideologically opposed almost all small open-source projects will get a larger company to backed them up. I think there are more direction and governance issues than financial.

Re: Crystal 1.0 – What to expect

#35

It feels like Crystal it took all the best things from the languages I love, and put them together into one, beautiful language: - Elegance of Ruby - Statically type checked + global type inference - No Nulls - Go-like concurrency - Easy C ffi - High performance I really hope the Crystal succeeds and the language goes mainstream - this release is a huge step forward towards that. Congrats to the Crystal team for reac…

> No Nulls

Does it not? It has 'nil', just like Ruby. Basically the same thing, the docs literally say it's 'similar to null in other languages'.

https://crystal-lang.org/reference/syntax_and_semantics/lite...

Re: Crystal 1.0 – What to expect

#36

Earlier quoted context omitted.

Would a developer looking a Zig/C++/Rust really also consider Crystal? I figured Crystal was for Ruby developers who want a good static type system.

Crystal's appeal, for me at least, is the productivity of Ruby with the memory efficiency and execution speed of C++. Static typing is just a way of achieving that, it's not something I'm seeking per se.

Remember static typing is also really useful for code quality and avoiding hidden bugs. Some code in Ruby requires a ton of specs to discover bugs caused by type issues, while the Crystal compiler tells you immediately that something doesn't work out. I love Crystal's type system really for productivity reasons.

Re: Crystal 1.0 – What to expect

#37

Earlier quoted context omitted.

I just downloaded 1.0 and tried hello world. It took over 2 seconds. I hope that's just some kind of bug.

There is a cache that was previously cold. Subsequent runs should be faster. However compile times are longer than other languages like Go.

In .cache/crystal/? 2 seconds is with that. If I delete it, the next build takes 3.

Re: Crystal 1.0 – What to expect

#38
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.

Re: Crystal 1.0 – What to expect

#39

It feels like Crystal it took all the best things from the languages I love, and put them together into one, beautiful language: - Elegance of Ruby - Statically type checked + global type inference - No Nulls - Go-like concurrency - Easy C ffi - High performance I really hope the Crystal succeeds and the language goes mainstream - this release is a huge step forward towards that. Congrats to the Crystal team for reac…

> No Nulls Does it not? It has 'nil', just like Ruby. Basically the same thing, the docs literally say it's 'similar to null in other languages'. https://crystal-lang.org/reference/syntax_and_semantics/lite...

It has a Nil type, not a Nil Value.

So a function might return an Int or a Nil, but if you then try to, say, invoke a function expecting an Int on a Nil, it predictably blows up. An Int cannot be Nil itself.

Re: Crystal 1.0 – What to expect

#40
post #28

Huh - what's the last language that got mainstream adoption without backing from a large company? It almost seems impossible these days. Ruby?

Crystal has been getting at least some funding from various companies. Maybe not what you would consider a large one, though.
Post reply on HN