Live data from Hacker News

Why Crystal is the most promising programming language of 2018

medium.com

41–50 of 109 posts

Re: Why Crystal is the most promising programming language of 2018

#41
post #21

Earlier quoted context omitted.

This is the entire reason I got burned out on new languages.

I learned to minimize burns by looking at everything that comes out as learning process, there is always something that makes us better developers. However for production code I only use the programming languages directly supported by platform owners. Of course others rather take part in ramping up eco-systems and that is fine as well, otherwise we wouldn't get new toys adopted by platform owners.

True. I guess I mean that after a while I started classifying languages like this as "flavors of C". There are just so many languages that are fast, it's no longer a selling point.

Out of all of the languages I've read about the past few years, only 3 jumped out as bringing real value to the table compared to the other options that are already out there: Go, Rust and Elixir.

Re: Why Crystal is the most promising programming language of 2018

#43
This is what I appreciate about HN: reading that I was pretty convinced and had no idea what Crystal's shortcomings might be.

Then I read the comments and the largest single complaint is lack of parallelism, by which people seem to mean being able to utilize all the cores of the processor.

I've been programming for a while, but haven't run into this issue.

Can someone explain who uses parallelism, for what, and in what context?

Re: Why Crystal is the most promising programming language of 2018

#44
I think some of the comments here are unfair to Crystal and the careful thought (and lots of work!) that has been put into it. Projects like this should not be so easily dismissed as "also-rans".

I read through the Crystal language docs (meaning just the syntax etc) and as a seasoned C++ and Python developer who is _constantly_ looking for something with better performance (than Python) yet much cleaner (than C++), I think Crystal has a lot going for it so far.

Any "great" language should be able to take a thought in a developer's head and easily allow 1) the concise expression of that thought, and 2) efficient evaluation of that thought. I mean, those things we probably would all agree on.

It saddens me to say this, but C++ is falling over as a result of it's own weight. It's become a language for experts. Perhaps more than any popular language, it can take a simple idea in a developer's head and turn it into pages of code. It's actually quite embarrassing. I won't go into that further; judge for yourself (and sorry if that comment offends anyone -- I love C++ and use it every day). But you just can't beat the speed... Well-crafted C++ _should_ exceed the speed of even C (Why? Because templates...). As an aside, it's disingenuous to put Java in the same speed category as C/C++... The "fast" Java programs out there are basically C with Java wrappers (ducks thrown tomatoes). And just like C++, Java is very noisy (but for different reasons).

Python as we all know sort of takes the opposite approach, with dynamic typing a design-as-you-go mentality. And boy what a success it has been, with a flourishing package ecosystem. There's lots of good things to say about Python, but it's f*cking slow as hell (Cython is a hack, Numba shows promise, but PyPy isn't much faster... I was excited about Pyston but don't know where that went). It's not the fault of Python that it's slow -- it's the price of such a wonderfully dynamic language.

So enter things like Crystal. And trust me -- it's definitely early days with this language. But I like the fact that the designers really seem to care about the things that (to most of us I think) matter.... Taking an idea in our brain and putting it (simply) down in code, and then having that code run quickly. Yay!

In this day and age where we are swamped with hype from all of these new languages, let's give praise where it's warranted -- to the people are out there that are trying to refine decades worth of thought and finally "get it right".

My hat is off to those people out there that are forging ahead with these types of projects. Don't mind the criticism -- keep it up and great job.

Re: Why Crystal is the most promising programming language of 2018

#45

I've been keeping my eye on Crystal for a while now thinking about making the plunge and writing something production ready in it. But I'm a bit vary as for the casual observer the Crystal project github ( https://github.com/crystal-lang/crystal ) seems brim with unsolved issues (over 500 issues!) and stale PR-s (over 105!). I'm not sure if this is a sign of poor project managment, development stall or poor community…

The number of open issues is a bad correlation for how well a project is managed: rust has nearly 4000 open issues. Most of these are either feature requests we'll get to some day, or minor bugs. Crystal development is proceding nicely and we will have two developers (bcardiff and me) working full-time on crystal this summer.

Re: Why Crystal is the most promising programming language of 2018

#48

> Recently Crystal shocked the world when it rose from 60th place to 32nd place in the Tiobe index in a mere month Meteoric! Because we all know the the Tiobe index is incredibly accurate. Would have been nice to see some code examples, rather than just handwavey bullets points that you could write about nearly every up-and-coming programming language.

On the TIOBE index homepage it seems to be currently (June 2018) listed in the 61st place.

Re: Why Crystal is the most promising programming language of 2018

#49
post #16

> Because Crystal is compiled, it is impossible to have a true REPL First of all, the problem isn't that it's "compiled" - Python is "compiled" too, but still has one of the best REPLs available. The problem is that the language is static. But static (and compiled) languages can have REPLs, for example C++ has an excellent REPL called Cling. It's not impossible, just requires some more effort. As for Crystal, it look…

No, it's not because it's compiled, it's because of the global type inference algorithm (which is very different from any existing type inference algorithm). Crystal used to have a repl but it was removed because it was buggy and difficult to maintain. Maybe crystal will get a repl in the future, but I wouldn't count on it because it's a huge effort.

Re: Why Crystal is the most promising programming language of 2018

#50

Well, here is why not. AFAK, it still lacks support for parallelism / multicore programming. Please correct me if I'm wrong. Once it has that, I'll be happy to learn it, but currently it's concurrency seems to be as limited as Racket's. That's a big obstacle for early adoption, since the trend is going towards 64 cores sooner than later. My current CPU already has 8 physical cores and 16 logical cores, and I'd like t…

Are you sure Racket doesn't support parallelism?

It does, in at least two different ways:

1. via `places` - basically spawning a new OS-level process and communicating with it. Has an advantage of being able to talk to processes on other machines.

2. via `futures` - OS-level threads, which insert synchronization points automatically where necessary. You have to structure your code in a particular way to make them not to sync, at which point you get a safe parallelism within a process. You get a future visualizer which helps in finding unsafe (syncing) memory accesses.

So the support for parallelism may be nowhere near Erlang or Pony, a bit worse than Java and a bit better than Python or Ruby.

Post reply on HN