Live data from Hacker News

Crystal 1.0 – What to expect

crystal-lang.org

141–150 of 351 posts

Re: Crystal 1.0 – What to expect

#141

Earlier quoted context omitted.

> Maybe the most powerful of any fully statically typed language? Compared to Haskell, Ocaml, Scala, F#, ...? Writing it like a dynamically typed language is standard for full type inference.

Those functional languages don't have function overloading or named arguments. The type inference in Crystal works very differently. The type of a method can only be computed from explicit calls to it. In those functional languages the type can be computed independent of a call because it's trivial to do so if a function name always refers to a single entity.

> Those functional languages don't have function overloading or named arguments.

Scala has both, F# too (though function overloading is possible, I think it's not idiomatic), OCaml has named arguments, Haskell has overloading.

Re: Crystal 1.0 – What to expect

#142
post #55

Congrats on the release! The biggest factor drawing me to experiment a little with Crystal is that it is one of very few languages providing what otherwise has been pretty unique to Go: Lightweight threads+Channels+M:N concurrency (automatically multiplexing the lightweight threads onto a smaller number of OS threads). Also it does it with a very readable and clean syntax. Wrote a little about it, with code compariso…

Erlang has been doing this for the better part of three decades. Of course Erlang doesn't compile to native code, so at least that's a difference.

Re: Crystal 1.0 – What to expect

#143

Earlier quoted context omitted.

Crystal's type inference is more powerful than most other languages. Maybe the most powerful of any fully statically typed language? (I would love to hear of any others that have taken the same approach as Crystal.) You can almost write Crystal like a dynamically typed language, and yet everything is still fully statically typed. I believe you can speed up your compile times a bit by being explicit with annotations (…

> Maybe the most powerful of any fully statically typed language? Compared to Haskell, Ocaml, Scala, F#, ...? Writing it like a dynamically typed language is standard for full type inference.

I should have qualified that statement with OO languages, not functional. Also see asterite's reply, he would know much better than me, as I believe he's one of the core Crystal developers.

Re: Crystal 1.0 – What to expect

#145
post #55

Congrats on the release! The biggest factor drawing me to experiment a little with Crystal is that it is one of very few languages providing what otherwise has been pretty unique to Go: Lightweight threads+Channels+M:N concurrency (automatically multiplexing the lightweight threads onto a smaller number of OS threads). Also it does it with a very readable and clean syntax. Wrote a little about it, with code compariso…

Erlang has been doing this for the better part of three decades. Of course Erlang doesn't compile to native code, so at least that's a difference.

It does have a JIT now.

Re: Crystal 1.0 – What to expect

#146

Earlier quoted context omitted.

Ah! I hadn't thought of those, though I think because 3 out of 4 are tied to a specific platform

I think you mean 1 out of 4? Swift is the only one on that list that really feels tied to any particular platform. C# has been extremely portable for years now thanks to .NET Core. Even SQL Server runs on Linux these days, if you really just enjoy spending money. Java has always had a strong focus on portability, of course. Nim... I don't know much about. Doesn't it compile to C? I don't think it intentionally has an…

Nim does/can indeed compile to C.

Re: Crystal 1.0 – What to expect

#147
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!

HTTP is a first class member of the standard library, along with bcrypt, JSON, and a host of other useful stuff? https://crystal-lang.org/api This is a sweet spot for anything web-server related (which is quite a lot, these days, considering mobile API's and such...) I would actually hesitate to use a framework for many use cases, although Amber and Lucky are competing for a "soup-to-nuts" total platform, Kemal fills…

There's also https://athenaframework.org, which takes its inspiration from more of a Spring/Symfony based approach. Brings some new ideas & unique features into the space mostly dominated by Rubyesque frameworks.

Re: Crystal 1.0 – What to expect

#148
If it doesn't have first-class windows support or multithreading then I can't be bothered, sorry.

I'd prefer it be a gcc frontend, too, to gain access to all the interesting targets that gcc supports and llvm doesn't.

Re: Crystal 1.0 – What to expect

#149
post #70

Earlier quoted context omitted.

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

> - tooling is abyssmal ( IDE etc ... ) As others have mentioned this is a side effect of how young it is. > - no real support, I'm not even sure if there is one paid guy anymnore on the project If paid support is all that counts then most languages would fall into that. > - it's still immature Tautological. Nothing can become mature without first being immature. > - they break the API all the time Isn't that what a…

Languages / ecosystems being immature is not a tautology. Every one is at some point immature, but it's not a self-defining attribute of a language, nor is it necessarily true for a given language. It's entirely fair to call out "this language does not have a significant, stable, healthy ecosystem behind it (yet?)" because dealing with that stands a pretty good chance of taking up a large amount of time. Some uses / users are fine with that, others are not.

Re: Crystal 1.0 – What to expect

#150

Earlier quoted context omitted.

I think you mean 1 out of 4? Swift is the only one on that list that really feels tied to any particular platform. C# has been extremely portable for years now thanks to .NET Core. Even SQL Server runs on Linux these days, if you really just enjoy spending money. Java has always had a strong focus on portability, of course. Nim... I don't know much about. Doesn't it compile to C? I don't think it intentionally has an…

C# is tied to .net, and the cross-platform story on that framework is...complicated Java is tied to JVM Swift is tied to MacOS. Of course, with the exception of JVM, they are all nominally "cross-platform" in the OS sense of the word. But I haven't seen any substantial Linux/Mac .Net codebases yet, same with Swift on Windows

The cross-platform story of .NET hasn't been complicated in a while. It's fully cross-platform between Windows, Linux, and macOS and has been for a few years.

Edit: I just saw the person that you replied to said the same thing, so I'm not sure why you're pushing that it has a complicated cross-platform story.

Post reply on HN