Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Interesting, a lot of new languages are dynamic languages with types.

You should try crystal lang if you love writing ruby code.

crystal lang has both interpreter and compiler, so that you can debug with interpreter during development and run compiled binary in production.



Hard to tell. But currently the Crystal type system is a bit restricted.

For example, you can't express this in crystal, like in Typescript:

    type Easing = "ease-in" | "ease-out" | "ease-in-out";


Why would you want that over enums?


Enum is limited for integer value.


You can define string enum type with a macro.

https://github.com/crystal-lang/crystal/issues/10281#issueco...


The internal representation doesn't really matter, does it?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: