4 ms·
Thus summarizes the negatives. Do you have any examples of languages with effective solutions to the expression problem?
by ghotli 16y ago
Thus summarizes the negatives. Do you have any examples of languages with effective solutions to the expression problem?
- swannodette 16y agoScala (implicits, structural typing) and Clojure (protocols, extend-type) both have great solutions to these problems. Anyone know of other langs that deal with these issues properly?
- Zaak 16y agoHaskell has type classes and type inference which seem like they would be helpful.
- joshhart 16y agoScala has (limited compared to Haskell, but still powerful) type inference and a way to simulate type classes as well.
- gtani 16y agoScala type inference is still evolving (as are clojure, and, I think, haskell and F#) http://www.reddit.com/r/scala/comments/ectzr/why_no_type_inference_in_scala/ http://www.reddit.com/r/scala/comments/ectzr/why_no_type_inf...
- rlmw 16y agoHaskell. Aside from usual functional facilities for code reuse such as polymorphism and Higher Order Functions, monads (specifically monadic composition) and Type Classes are quite useful for writing generic code.
- vegai 16y agoGo also.
- uros643 16y agoAm I correct in assuming that any language with support for overloading functions for new types, instead of extending existing types with new members/methods, would have a solution to such issues? This would then also cover: * anything CLOS-inspired: Common Lisp, Dylan, Factor, Clojure * but also presumably anything with C++- or Clay-like (http://tachyon.in/clay/ http://tachyon.in/clay/) generic programming, namely w.r.t generically using freely-overloadable functions. I believe Haskell achieves something similar to this using type classes.