4 ms·
Am I wrong or is OP describing most of what swift currently offers. Optionals, extension where syntax, Result<> monads, exceptions collapsed to a single line wi
by seanalltogether 6y ago
Am I wrong or is OP describing most of what swift currently offers. Optionals, extension where syntax, Result<> monads, exceptions collapsed to a single line with try? syntax, safe casting with as?, etc...
- brobdingnagians 6y agoSame with kotlin. It appears that most of the advances are really really great and emerged in a wave in the '10s. We are a decade ahead of the curve ;) I think doing away with checked exceptions was a definite benefit in that direction too.. Having higher kinded types and type classes like Haskell would be nice though. I think there are definitely things in the article which could be even better, but we've definitely moved that way, and the next generation of language designers will probably have even more insight into how to elegantly combine those features as well.
- pjmlp 6y agoOr OCaml, Eiffel, Sather,...
- virtualwhys 6y ago> Having higher kinded types and type classes like Haskell would be nice though. Don't have to leave the JVM, already there in Scala. And Kotlin Arrow may get merged into the compiler, so Kotlin may have first class support for these language features one day...
- hedora 6y agoScala uses type erasure to preserve compatibility with the JVM. No thanks. I want the compiler to statically verify my types, and then optimize based on that. At some point, I realized Java code tends to have many more runtime type errors (in particular, NullPointerExceptions and ClassCastExceptions) than similar C++ code (segfaults). Things like rust should be even better than C++, but that’s practical largely thanks to performance optimizations from llvm. Other than Java compatibility, I don’t see any advantage to the JVM at this point.