3 ms·
Ruby's type system is completely optional using separate definition files (except Sorbet, which isn't part of the core language), while Crystal's is built in an
by cguess 5y ago
Ruby's type system is completely optional using separate definition files (except Sorbet, which isn't part of the core language), while Crystal's is built in and required.
- TranquilMarmot 5y agoIt also seems like Crystal is compiled, yeah? Would it be safe to say "Crystal is like Ruby but compiled and faster"?
- dragonwriter 5y agoCrystal is like Ruby but not dynamic, with macros, without reflection, with arbitrary API changes to the core types that are shared, with value/reference type dichotomy, compiled, and faster. Or, with apologies to the late Douglas Addams, Crystal is almost, but not quite, entirely unlike Ruby.
- antifa 5y agoCrystal has compile-time macros/reflection, instead of runtime.
- antifa 5y agoYou can also think of it as "what if golang had a real type system and ruby style syntax".