User loginNavigation |
Different approaches to letting a programmer define interface implementations.I'm looking at how different statically typed languages tackle the problem of letting you define types and define interface implementations for those types. For example, to define an implementation of interface I for type T, Java uses interface methods, Haskell uses typeclasses, Scala uses implicits. The disadvantage of the Java approach when compared with Haskell/Scala:
Haskell approach vs Scala approach:
What do you think is the "right" way to do this? Given my limited knowledge right now, I think I'd go with something Scala-like and maybe make some modifications. For example, I think the "only one implementation per type" restriction of Haskell might be useful. Is there a good survey of the different approaches? By Kannan Goundan at 2013-12-30 15:15 | LtU Forum | previous forum topic | next forum topic | other blogs | 27708 reads
|
Browse archives
Active forum topics |
Recent comments
27 weeks 1 day ago
27 weeks 2 days ago
27 weeks 2 days ago
49 weeks 3 days ago
1 year 1 week ago
1 year 3 weeks ago
1 year 3 weeks ago
1 year 5 weeks ago
1 year 10 weeks ago
1 year 10 weeks ago