11 votes

The Crystal Programming Language

5 comments

  1. Infra
    Link
    Wow. As a Rubyist, this intrigues the heck out of me. Interested parties might also want to take a look at Elixir which shares a fair amount of Rubyesque attributes such as duck typing, rich...

    Wow. As a Rubyist, this intrigues the heck out of me. Interested parties might also want to take a look at Elixir which shares a fair amount of Rubyesque attributes such as duck typing, rich introspection, and a reasonably eloquent language. While not quite as idiomatic as Ruby in terms of sheer syntactic sugar, it compensates by possessing a back-end as powered by Erlang. In addition, interprocess / thread communication is represented by a psuedo-actor model, which for people like me (from a MUD development / heavy pub-sub paradigm background) it is fantastically interesting.

    For an implementation of the same paradigm inside of Ruby, check out Celluloid.

    4 votes
  2. [2]
    crius
    Link
    OP maybe elaborate on why you think others should try and adopt it? Which are the strenghts? Why it has been created. In which case I should skip PHP / JS / whatever and use Crystal instead?

    OP maybe elaborate on why you think others should try and adopt it? Which are the strenghts? Why it has been created. In which case I should skip PHP / JS / whatever and use Crystal instead?

    2 votes
    1. prydt
      Link Parent
      yeah... I'm interested in this language because of its succinct (ruby-like) syntax and performance... it out performs many other languages by orders of magnitude... the only downside is that the...

      yeah... I'm interested in this language because of its succinct (ruby-like) syntax and performance... it out performs many other languages by orders of magnitude... the only downside is that the language has no real company backing, so it is kinda unstable right now and hasn't reached a 1.0

  3. [2]
    SourceContribute
    Link
    Every time I look at any Ruby or JS tech I have to figure out whether it'll work with the stuff I work on that's actually in production and serving users. In most cases, the answer is no. Things...

    Every time I look at any Ruby or JS tech I have to figure out whether it'll work with the stuff I work on that's actually in production and serving users. In most cases, the answer is no. Things like reactive programming or Crystal, they look great, but there's no easy path to integrate them even a little bit into a Ruby on Rails project.

    It would be nice if these projects would target a few clear use cases and have clear documentation on integration with existing projects. Like type errors? That would be golden for a Ruby on Rails project; but how the heck can I port over some parts of a Rails app to Crystal without impacting the rest of the code and being able to re-use the models?

    1. prydt
      Link Parent
      Its probably not a good idea to use Crystal in production just yet because it hasn't reached a 1.0, but all the features currently implemented will probably stay... Also about its relation to...

      Its probably not a good idea to use Crystal in production just yet because it hasn't reached a 1.0, but all the features currently implemented will probably stay...

      Also about its relation to Ruby, it is similar in syntax, but not really much else. The idea is to have a language that is as simplistic as Ruby, but faster. Porting over a current Rails app probably wouldn't have as many performance gains as just building it from the ground up with Crystal in mind. The docs are a great place to get started and learn about the differences and how to use Crystal efficiently.

      On errors: https://crystal-lang.org/docs/syntax_and_semantics/exception_handling.html
      On performance: https://crystal-lang.org/docs/guides/performance.

      1 vote