3 ms·
This is no longer a testimony of Ruby's strength, or rather this highlights Ruby's age and stagnation. D, Go, C#, Rust, Swift, Kotlin, Scala, Haskell, and (mor
by lkjsaofinwdfsdf 5y ago
This is no longer a testimony of Ruby's strength, or rather this highlights Ruby's age and stagnation.
D, Go, C#, Rust, Swift, Kotlin, Scala, Haskell, and (more I'm forgetting) already have this without the hack of monkey patching.
If you really find beauty in DSL's you should look into tagless final encoding in Haskell.
From what I recall Ruby still doesn't have first-class ADT's. Meanwhile Java will be getting sealed classes (the OO orthogonal to ADTs) with pattern matching.
- spyckie2 5y agoNot to overstate the point, but what many Rubyists want in programming is to mirror their code to a subset of English as much as possible, avoiding the more ambiguous parts of English. This is because if it makes sense in English, it is self documenting, clear, and intuitive. By DSL, I meant an abstract language on top of an existing programming language that serves a domain well and Ruby's monkey patching makes that easy to implement. Haskell's language, with it's custom non English symbols, and functional language with verb object or even operator at the end style... it's like dvorak vs qwerty. Even if it is superior, it's not the preferred one.