On 15/11/2012, at 1:06 PM, Dobes Vandermeer wrote:
> Well consider a type class:
>
> class Widget[T] {virtual draw(w:T...) ;} ;
> instance Widget [button] { draw(w:button...){...} } ;
>
> Wouldn't it be nice if you could do:
>
> val b = makeButton () ;
> val w = b as Widget;
> draw(w,...) ;
>
Well consider a type class:
class Widget[T] {virtual draw(w:T...) ;} ;
instance Widget [button] { draw(w:button...){...} } ;
Wouldn't it be nice if you could do:
val b = makeButton () ;
val w = b as Widget;
draw(w,...) ;
The compiler can generate a record type with all the virtual functions of
On 15/11/2012, at 7:27 AM, Dobes Vandermeer wrote:
> The main missing link between Felix and that is the ability to easy "package"
> an object to provide just the virtual members of a type class while keeping
> the "true" type hidden, thus allowing collections of heterogeneous elements.
I thin
On 15/11/2012, at 4:50 AM, Raoul Duke wrote:
> [why is there more than one felix list?]
When we switched to Google groups, I kept sourceforge
mail alive because some of the respondents had some
objections to Google.
Don't really want to lose any Lurkers .. its all I have :)
--
john skaller
s
On 15/11/2012, at 4:18 AM, Dobes Vandermeer wrote:
>
> Of course, one might also argue that your use of objects instead of type
> classes points to a failure of your type class system. Surely you can do
> whatever you are doing with objects using type classes? Perhaps there's
> still hope t
Interesting essays, thanks for sharing those.
There's always a weakness somewhere, that's what making design trade-offs
is all about. I do think the type classes thing is a more promising
direction of expansion (for Felix) than the object system. But if the
object system were improved, some thou
[why is there more than one felix list?]
On Wed, Nov 14, 2012 at 9:18 AM, Dobes Vandermeer wrote:
> Of course, one might also argue that your use of objects instead of type
> classes points to a failure of your type class system. Surely you can do
> whatever you are doing with objects using type
It doesn't surprise me at all that you're finding objects to be very
useful, because they are!
Unfortunately, it seems like your dislike of OOP has left you a bit unsure
about how to "do it right".
Continue down this road and you'll end up in one of the places where the
people who really gave it
On 14/11/2012, at 7:24 PM, john skaller wrote:
>
> So what I think we need to "fool"** Java programmers into thinking we
> have OO is a simple syntax for method delegation. Any suggestions
> how to encode the above technique in a slightly nicer syntax?
OMG. Its already implemented!
object joe[