Ah, Tony Morris. Still getting kicked out of ##java within 10 minutes of opening your mouth? I do want functional programming to become more of an influence, so some friendly advice: You don't want him as your evangelist.
Please look at the PDF I linked to, written by amongst others, Martin Odersky. Here's a link, again: http://www.cs.kuleuven.be/~adriaan/files/higher.pdf it contains evidence that you're talking complete and utter crud. Please stop talking hogwash. Did I mention the paper is co-authored by Odersky? If his understanding of the concept 'higher kinded type' is entirely different from your own, I suggest you get your terms straight. The paper: A) It says that map() is a method in Scala's Iterable trait. Right there, on page 2. It even lists a handy snippet of Iterable! B) It says that early scala type system could not handle this Iterable thing (a.k.a. Mappable) properly because back then it didn't support type constructors while constructing type constructors. Which it then equates to the term 'higher kinded types'. C) The paper concludes with a solution that is 100% analogous to my java example (and incidentally, your trait Functor). Contrast this to your claims that: A) map() isn't part of Scala's iterable, B) My mappable example has nothing to do with higher kinded types, and C) my solution isn't what scala does / aggrevates you to no end and is apparently vastly inferior, which I infer from your condescending tone. Then again, your tone is always condescending so its kinda hard to tell. Please stop insulting me, review the PDF, and go away. On Dec 23, 11:55 pm, Tony Morris <[email protected]> wrote: > > An interface that declares that a certain container type is capable of > > running the map function. This is Iterable in scala... > > Bzzt wrong, perhaps you don't know as much about Scala as you think. > And even if it was Iterable, this has nada to do with higher kinds - > you know, abstracting on *type constructors* as James has already > mentioned - perhaps you don't know as much about type system as you > think. > > This is what a "mappable" declaration looks like in Scala using higher > kinds: > > trait Functor[F[_]] { > def fmap[A, B](fa: F[A], f: A => B): F[B] > > } > > Note its complete lack of resemblance to Iterable. > > And in Haskell: > > class Functor f where > fmap :: f a -> (a -> b) -> f a > > And in Java: > Oh wait, you can't; you're screwed - the type system is completely > inept. > > You're out of depth again Zwitserloot. You're stuck in Java Nanny land. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/javaposse?hl=en -~----------~----~----~----~------~----~------~--~---
