4
retoor
2d

https://crystal-lang.org/

Experimented. Made a websocket app. Compiled to nice single binary. Package management bit meh. Some std issues but it's soon I guess?

Am I late of early to this party?

Thoughts / experiences regarding this language anyone?

Comments
  • 2
    @chatgpt crystal-lang overview of why it exists
  • 1
    @jestdotty
    Crystal is a statically-typed, compiled programming language that was created with the goal of combining the elegance and expressiveness of Ruby with the speed and efficiency of C. It aims to provide a high-performance alternative to popular dynamically typed languages like Ruby, while still maintaining a developer-friendly syntax and features like type inference.

    One of the key motivations behind the development of Crystal was to leverage the benefits of a compiled language in terms of performance and efficiency, while still allowing developers to write clean and concise code. By offering a familiar Ruby-like syntax, Crystal makes it easier for Ruby developers to transition to a more efficient language without sacrificing the ease of use and simplicity they are accustomed to.

    In addition to its performance benefits, Crystal also comes with a powerful macro system that allows developers to write code that is both efficient and expressive. This feature, along with its stati
  • 1
    c typing system, enables developers to catch errors at compile time rather than runtime, leading to more robust and reliable applications.

    Overall, Crystal exists to offer developers a modern, efficient, and developer-friendly alternative to dynamically typed languages like Ruby, while still maintaining the flexibility and expressiveness that make them popular among developers. It aims to bridge the gap between high-level scripting languages and low-level compiled languages, providing a best-of-both-worlds solution for those looking for a performant and expressive language for their projects.
  • 2
    it isnt a "full" language but a C/pp wrapper-ish like Python is, no? if im reading their landing page correctly
  • 1
    @azuredivay Python is not a C/CPP wrapper mate.
  • 1
  • 1
    @hjk101 isnt it? all PY compiles to C/PP binaries if I remember right
    Like TS is to JS
  • 2
    @azuredivay python is interpreted and i think they introduce some kind of bytecode now like java. Nothing compiled to C as far as I know
  • 2
    Really interesting ideas on the website, very active development, probably won't get around to trying it for a while but I wonder if they have a breakdown of the type system somewhere because I like the booleans and would like to see if and how they combined generics with them.
  • 2
    The main reason union types are unpopular is that they interact weirdly with generic constraints. But I also see that constraints are implicit? Again, really interesting stuff.
  • 2
    looking at recently closed issues, it definitely doesn't seem like a project in decline. I really should find some time to test drive it.
  • 1
    @azuredivay see what @antigermgerm said. You can also run python code in REPL no compilation going on there. Also not all compilation is C/CPP. There are some true wrapper languages out there but calling python a wrapper language is like calling C/CPP just an assembly wrapper (and that would be more true)
Add Comment