• LedgeDrop
    link
    fedilink
    arrow-up
    4
    ·
    edit-2
    1 year ago

    Oh my favorite is Crystal. It’s a statically compiled dialect of ruby.

    It supports:

    • Most of the ruby goodness: custom DSLs, patching classes/mixins (monkey patching instances is not supported)
    • Compile time type checking (but it also uses duck typing)
    • Coroutines / fibers that work across multiple threads (multi-thread support is still experimental, but from my experience works well)
    • Possible to create small self-contained binaries (like go-Lang apps).

    As much as I love the expressiveness of crystal, there are a few cons:

    • It’s slow to compile. Due to the dynamic nature of the language, the compiler needs to parse a lot of files (think C/C++) before it creates a binary.
    • The number of libraries is very immature at the moment. Crystal is a young language and is missing support for things like aws.
    • The library management mechism (called “shards” akin to ruby gems) is not great (in my opinion). There are helpful tools to create the scaffolding, but if you’re pretty much stuck with the defined structure. For example you cannot have a single git repo that provides a library and an application that uses it.

    Other than that, the type checking but with ruby-like syntax is awesome!

    edit: fixed formatting