3 ms·
> dynamic languages offer cleaner syntax Solely for syntax, my assertion is that this is just because dynamic languages evolve faster. Because they are easier
by stephen 11y ago
> dynamic languages offer cleaner syntax
Solely for syntax, my assertion is that this is just because dynamic languages evolve faster. Because they are easier to build.
E.g. one person can buy the dragon book(s), use parser/lexer libraries, get an AST, and then start an interpreter than just stores objects as maps, and evals things dynamically.
But very few people are going to write a new/novel type system on their weekends.
So that's why, IMO, all the sexy/modern syntax shows up in dynamic languages first, and then takes ~a generation or two to reach static languages, where you need a dedicated team to put the effort into the type system + compiler + expected tool set (IDEs/etc.).
(E.g. see Scala, Kotlin, Rust, etc., which have all, IMO, achieved the "syntax as nice as Ruby" level, but took large teams of people to do it).
- marcosdumay 11y ago> But very few people are going to write a new/novel type system on their weekends. No, but one can hack an extension to the GHC type system in a weekend. (That's one of the reasons why there are so many.)
- Veedrac 11y ago> see Scala, Kotlin, Rust, etc., which have all, IMO, achieved the "syntax as nice as Ruby" level I've only reasonable experience with Rust in that list but... no. I've seen enough Scala to get that that's not true, and I know it's not true for Rust. That's not to say that static languages can't have nice syntax - Crystal is a great example if you'r trying to match Ruby - but I don't think your examples are great.