Also Crystal has a dedicated a wiki page for production users
Used in production: https://github.com/crystal-lang/crystal/wiki/Used-in-product...
$ iex
> "1 2 3" |> String.split |> Enum.map(fn x -> String.to_integer(x) * 2 end)
[2, 4, 6]
$ irb
> "1 2 3".split.map {|x| x.to_i * 2}
[2, 4, 6]
which by the way highlights the extra verbosity of Elixir compared to Ruby. It's less verbose on more complex examples, mainly because of pattern matching, but the proof would be too long for this reply."1 2 3".split(' ').map { it.toInt() }
The same as grandparent, in crystal:
"1 2 3".split.map &.to_i.*(2)Ruby has a similar version using colon instead of dot but that version isn't chainable and doesn't take arguments so it can't do the *2.
And no, you can write out the full block just as you did in the Ruby version.
"1 2 3".split(' ').map { it.toInt() * 2 }So I think the differences are there but they’re being overstated from a transfer of skills standpoint.
If you'll forgive the snark, you've moved from one obscure language, to an even more obscure language that even fewer developers know.
What is it about Crystal that outweighs the very boring practical downsides of production use of obscure and immature languages?
Their developers are already proficient in Ruby. Crystal is a very, very close cousin of Ruby, syntactically and structurally. This isn't like jumping from Java to Haskell.
The 'Boo' language does the same for Python.
Tons of startups, and tons of billion dollar companies, run on Ruby / Rails. How is it "obscure"?
Crystal sure.
Then again, PG who created Hacker News used Common Lisp, which at the time had about the same developer pool as Crystal give or take (well, not really, but close enough, compared with industry favorite languages).
https://medium.com/@yoelblum_45935/demand-for-ruby-on-rails-...
That said, I was an avid PHP developer in the U.S. about 10-15 years ago and I always liked the language. There's just no one learning PHP anymore since all the kids just learn js, and no one trying out "hipster" languages like ruby/crystal/go/python/elixr/d/nim/rust/etc is going to try crusty old PHP.
I will say though that PHP, without any frameworks, is probably my favorite thing to develop a simple standalone site specifically because it lets you break all conventions and just output some damn content possibly with some simple logic involved and without using classes/mvc/etc.
Humans aren't robots, but one's choice of development tools is steered by real forces, both technical and business. I don't see that whim, unconstrained by such forces, has any place in the decision. Same goes for curiosity.
If it were my decision to choose a language to use in production, I'd want to go with a safe boring choice like Python/Java. Mature and stable on lots of platforms, easy to hire for, plenty of libraries and tooling.
Taking a risk is sometimes the right thing to do, but I don't see choice of programming language as being one of those times.
It's not that I don't like neat languages like Crystal - I really do - and I'm certainly not trying to put them down. I just wouldn't want to try to argue to management that using it is in the company's best interest.
Well, to use an analogy from civil engineering, I don't think choosing a programming language is always as critical as which type of concrete you choose and how it's reinforced. While it's true you wouldn't choose just any language, there is more room for preference here. Especially because you can switch languages for a project, but practically can't switch the material used in the foundation of a building.
> I just wouldn't want to try to argue to management that using it is in the company's best interest.
In some companies you don't need to argue with management about that decision. Also, a language being less popular or obscure doesn't mean you can't evaluate it's stability and feel comfortable enough with where it's at to use it. I'm glad people do because otherwise we wouldn't even see any language as popular as it is.
What do you mean? If you're 100kloc in, you pay a considerable price in jumping ship. Rewriting means throwing out your investment. Interfacing two different languages for one project is rarely a good move.
> I'm glad people do because otherwise we wouldn't even see any language as popular as it is.
Sure, me too. Like I said, I do like new programming languages, I just don't see myself using one for serious work.
I'm not here to recommend people use it in production, but I can understand the mindset of people who do.
That will never happen. Or when it did it will be all mechanized, with machines doing the programming.
It's not a myth, and I don't see that it should be dismissed as a pipe-dream to think that this sort of serious engineering approach could be adopted outside the critical-systems industry.
Really impressed with the language so far and hope to expand its use within our organization.
Anyone using Crystal? What do you use it for?
I wrote a version in Crystal (v0.10, I think) and Tcl to compare the two:
Crystal: https://chiselapp.com/user/rkeene/repository/hashcache/artif...
Tcl: https://chiselapp.com/user/rkeene/repository/hashcache/artif...
You’re rehashing the same 2 things many folks point out that Crystal is missing in its pre-1.0 state and while they’re obviously important for widespread adoption, they’re not reason in and of themselves to dismiss a language that’s otherwise super interesting to many.
Good luck trying to compile native libraries.
One big thing that is missing still is full google cloud platform and AWS libraries. There is an s3 connector but I think it's out of date.
Edit: Sails is not what it claims to be, and doesn't live up to the dream at all
Whoa, that's where you lost me. Sails has a reputation for being horrible, and after working on a production app using Sails, I agree. Perhaps you were wanting something like Rails but in JS, which is what Sails claims to be, but it barely lives up to that. I don't know if there are other frameworks that try to be the Rails of JS but it wouldn't be hard to better than Sails. I'm interested in hearing why you think it's so sane (no snark, I'm sincerely curious)
C#: verbose, magical dependency injection, Microsoft, etc.
Ruby: slow
Go: ugly syntax, verbose, if err != nil, etc.
If a language works for you I see no reason not to use it :-)