Live data from Hacker News

Crystal 1.0 – What to expect

crystal-lang.org

261–270 of 351 posts

Re: Crystal 1.0 – What to expect

#261
Crystal was first introduced to me a few years ago but it was still in early development I’ll need to revisit it again now that 1.0 has been released.

I’m curious as to what others in here feel about pros and cons of learning Nim compared to Crystal?

Re: Crystal 1.0 – What to expect

#262

I'm new to Crystal - have been using it the past three months on a new web API. (I'm using the Lucky framework - https://luckyframework.org/ ) It's fantastic. I can think in it. Thank you to all the devs behind this wonderful language!

I’m very interested in migrating a production rails apps to crystal / lucky. Was your previous exp using rails?

Re: Crystal 1.0 – What to expect

#263
post #261

Crystal was first introduced to me a few years ago but it was still in early development I’ll need to revisit it again now that 1.0 has been released. I’m curious as to what others in here feel about pros and cons of learning Nim compared to Crystal?

I'm in the same boat - looking at them both in quick succession, I chose to back nim because the error messages I got from Crystal were unusable.

Now that it is at 1.0, I agree - worth serious reconsideration. That said, it sounds like Nim's concurrency is far more mature than Crystals, and Nim works well on arm etc. So definitely worth another look, but might be a couple more years before I'm able to use it in anger unfortunately.

Re: Crystal 1.0 – What to expect

#264
post #185

I've used Crystal before, I liked a lot except the compilation time. I am excited to try it again, download Crystal + Lucky framework, but seems shards are not updated to 1.0 yet. I'll wait a few weeks before trying again.

If you do a 'shards install --ignore-crystal-version', it should mostly work. There aren't many breaking changes from v0.36.1.

Re: Crystal 1.0 – What to expect

#265
post #250

Earlier quoted context omitted.

Why is that important given Moores law and fast developer workstations? Everyone seems so preoccupied with compile speed for Crystal.

I think if you've been bitten by compilation times in e.g. Scala or C++, then compile speed is something you end up caring about. When it comes to modern static languages, it seem like there's a tradeoff where providing all the abstractions and ergonomics to make you not miss any functionality from dynamic languages will instead expand compilation times and make you miss the instant feedback of an interpreted languag…

C++ compile speeds can be easily improved when using binary libraries, incremental compilation, incremental linking, and hopefully modules will help as well.

Energize C++ and VA C++ v4.0 showed the way of a Smalltalk like experience for C++, the tools just need to catch up with the past.

VC++ and C++ Builder are on the good path for it.

Re: Crystal 1.0 – What to expect

#266

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…

Very well said. Elegance of ruby I think is very important for ruby developers who need a performant typed language.

“Ruby developers” should not exist. You use the right tool for the job. It’s great to have an option that is (partially) familiar, but as a developer you should not be limited by syntax choice.

Re: Crystal 1.0 – What to expect

#267

Earlier quoted context omitted.

All of those points are already met and in a better way by mature languages like e.g Kotlin. Really the only argument would be the "Ruby elegance" (or familiarity?) which I don't know. What make ruby/crystal more "elegant" (I would prefer the term readable ) than the competition?

Why Kotlin when you got Swift is an equally valid point. People like choice and for a lot of us, running on the JVM is a non starter. Try creating a small command line tool for a JVM language. You need to distribute a virtual machine with it. You got the overhead of firing up a VM or JIT just for a short lived session. Also JVM gobbles memory. You would not want a system made up of lots of tiny command line tools all…

Since 2000 AOT compiling into native code has been available to Java developers, no different from using something like Go.

That many didn't want to buy those compilers and settled with the free beer that could get hold of is another matter.

Re: Crystal 1.0 – What to expect

#268
post #5

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

Crystal has a GC. I see it as more similar to the likes of Nim, Swift, Java or C#. It's a great language regardless.

Lilith: x86-64 OS written in Crystal

https://github.com/ffwff/lilith

Re: Crystal 1.0 – What to expect

#269

Earlier quoted context omitted.

You can group languages in different ways. VM vs native is one way, but you can also go by the level of abstraction they provide, which very much puts them in the same category. Also, this debate comes up every time, but ARC is widely classified as a form of garbage collection, just not a tracing one. It is transparent and automatic to the user. (Well, apart from cycles)

I disagree with that classification, as there's no "garbage" state for references as they are destroyed immediately. All garbage collecting languages on the other hand have period of time where the references are intact but marked as garbage. FWIW Chris Lattner, the language creator, put Swift into a non-GC camp.

Because he needs to sell it, and Apple developers got a bad taste of Objective-C GC implementation that never worked out properly.

Widely acknowledged CS books see it differently,

https://gchandbook.org/

Re: Crystal 1.0 – What to expect

#270

Earlier quoted context omitted.

Crystal has a GC. I see it as more similar to the likes of Nim, Swift, Java or C#. It's a great language regardless.

Does languages don’t belong together. Java and C# sure. They use sophisticated garbage collectors and target intermediate code. Nim, Crystal and Swift all compile to native code and is designed for that. Swift is not a GC language in the normal sense since it uses automatic reference counting. That is fully deterministic and with low latency. There is no stop the world to collect garbage like with Java and C#. Swift…

C and C++ also target intermediate code,

LLVM, GIMPLE, TIMI, TenDRA,...

Java and C# also targeet native code,

.NET Native, CoreRT, IL2CPP, Mono AOT, SubstrateVM, GCJ, ExcelsiorJET, OpenJ9, PTC, Aicas,...

Languages and implementations are orthogonal.

Post reply on HN