|
implicit defs: msg#00440lang.scala
I made the mistake of emphasizing type-coercion as the main objective of implicit defs, but now I understand its role related to type-classes. I thought traits correspond to type-classes. let me guess. traits are like type classes, and implicit defs are instance declarations. www.scala-lang.org has a page http://www.scala-lang.org/intro/views.html and the example was pretty clear. the GADT example was clear as well. but I am mostly interested in: - rules of resolving ambiguity - interaction with/between subclassing, generics, view bounds if you guys recently had an experience of thinking through these, please share. I understand (mostly) Haskell type classes, and their inheritance. but their interaction with subclassing scares me. an expression in Haskell has a unique (polymorphic, at most) type, but subclassing destroys that. as far as I get it, this is the single most important difference between OOP and FP. let's bring forward thorniest issues we can think of, I will document it in the end and save it in the wiki so that later on we can just redirect questions there. ____________________________________________________________________________________ Do you Yahoo!? Everyone is raving about the all-new Yahoo! Mail beta. http://new.mail.yahoo.com |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Another nit: 00440, Tony Morris |
|---|---|
| Next by Date: | Re: assorted beginner questions: 00440, David Pollak |
| Previous by Thread: | assorted beginner questionsi: 00440, Yang |
| Next by Thread: | Re: implicit defs (Poor Man's Type Classes): 00440, Adriaan Moors |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |