News for hackers. Stuff that matters.
Re:The Crystal Programming Language by nitrogen on Sunday April 15, 2018 @04:21PM (#16844738)
Ruby does fine with #2. Fans of static type systems love to overstate perceived drawbacks of dynamic languages, but the simplicity of reading Ruby code built around JSON.parse vs. Scala or Kotlin with Jackson more than makes up for any type safety from the compiler.

Also, there's a sort of intermediate step, a dynamic language with schema validation, for which I wrote a modestly well-used (within the overall schema validation gem market) gem a while ago. Then you can validate at the point of translation, without being beholden to a concrete data type (POJO, data class, case class, etc.) that has to be updated whenever the wire format changes.

Re:The Crystal Programming Language by sidlls on Sunday April 15, 2018 @06:53PM (#16845480)
"but the simplicity of reading Ruby code built around JSON.parse vs. Scala or Kotlin with Jackson more than makes up for any type safety from the compiler."

"Readability" and "simplicity" are except for trivial or outlandish cases subjective.

For example, I rather enjoy reading code using Rust's serde crate: the code is quite readable and comes with all the benefits of Rust's static type system and safety.

Re:The Crystal Programming Language by yellowapple on Monday April 16, 2018 @02:32AM (#16847056)
Ruby also does a decent-enough job with #1, albeit with a bit of elbow grease required to massage arbitrary JSON data into Ruby class instances. Not as elegant as a static type system, sure, but still workable.