Re: Protocols

2003-07-26 Thread Richard J Cox
On Thursday, July 24, 2003, 5:45:33 PM, you (mailto:[EMAIL PROTECTED]) wrote: > On Thursday, July 24, 2003, at 08:49 AM, David Wheeler wrote: > No, I think Java interfaces are a kluge to get around copying a broken > type system and the lack of multiple inheritance. There are other alternatives..

Re: Protocols

2003-07-25 Thread Gordon Henriksen
On Thursday, July 24, 2003, at 09:45 , Kurt Starsinic wrote: On Jul 24, chromatic wrote: On Thursday, July 24, 2003, at 05:28 PM, Benjamin Goldberg wrote: The problem with Java interfaces is that you have to rely on the library writer to have expected you to use an interface. Given the amount

Re: Protocols

2003-07-24 Thread Kurt Starsinic
On Jul 24, chromatic wrote: > On Thursday, July 24, 2003, at 05:28 PM, Benjamin Goldberg wrote: > >If this were Java, the way to do this would be to define a Thingie > >interface, and then an (archetypical) ThingieObject class... any time > >that we want to actually *create* Thingies, we would use

Re: Protocols

2003-07-24 Thread chromatic
On Thursday, July 24, 2003, at 05:28 PM, Benjamin Goldberg wrote: If this were Java, the way to do this would be to define a Thingie interface, and then an (archetypical) ThingieObject class... any time that we want to actually *create* Thingies, we would use "new ThingieObject", but everywhere el

Re: Protocols

2003-07-24 Thread Benjamin Goldberg
Chromatic wrote: [snip] > > I think you want to declare "I comply with ruleset X" at the callee > > object level. That enables the compiler to (1) check that you're not > > lying; and (2) optimize based on (1). > > At least one of us is using "caller/callee" in the X11 sense. What I > mean and wh

Re: Protocols

2003-07-24 Thread Kurt Starsinic
On Jul 24, David Wheeler wrote: > On Wednesday, July 23, 2003, at 05:57 PM, chromatic wrote: > > >The first is a deeper question -- besides inheritance, there's > >delegation, aggregation, and reimplementation (think mock objects) > >that can make two classes have equivalent interfaces. I'd li

Re: Protocols

2003-07-24 Thread Austin Hastings
--- chromatic <[EMAIL PROTECTED]> wrote: > On Thursday, July 24, 2003, at 11:17 AM, Austin Hastings wrote: > > >> No, I think Java interfaces are a kluge to get around copying a > >> broken type system and the lack of multiple inheritance. > > > > Multiple Inheritance != Protocols | Interfaces >

Re: Protocols

2003-07-24 Thread chromatic
On Thursday, July 24, 2003, at 11:17 AM, Austin Hastings wrote: No, I think Java interfaces are a kluge to get around copying a broken type system and the lack of multiple inheritance. Multiple Inheritance != Protocols | Interfaces I quite agree, but I've done enough Java to know that if they coul

Re: Protocols

2003-07-24 Thread Austin Hastings
--- chromatic <[EMAIL PROTECTED]> wrote: > On Thursday, July 24, 2003, at 08:49 AM, David Wheeler wrote: > > > On Wednesday, July 23, 2003, at 05:57 PM, chromatic wrote: > > > >> The first is a deeper question -- besides inheritance, there's > >> delegation, aggregation, and reimplementation (t

Re: Protocols

2003-07-24 Thread chromatic
On Thursday, July 24, 2003, at 08:49 AM, David Wheeler wrote: On Wednesday, July 23, 2003, at 05:57 PM, chromatic wrote: The first is a deeper question -- besides inheritance, there's delegation, aggregation, and reimplementation (think mock objects) that can make two classes have equivalent i

Re: Protocols

2003-07-24 Thread David Wheeler
On Thursday, July 24, 2003, at 09:25 AM, Kurt Starsinic wrote: Sounds like you want Java-style "interfaces" to me. Follow the thread back. Objective-C had them way first, and their ur-name is "protocols." D'oh! Sorry, I had read that, but then forgot. David -- David Wheeler

Re: Protocols

2003-07-24 Thread David Wheeler
On Wednesday, July 23, 2003, at 05:57 PM, chromatic wrote: The first is a deeper question -- besides inheritance, there's delegation, aggregation, and reimplementation (think mock objects) that can make two classes have equivalent interfaces. I'd like some way to mark this equivalence *withou

Re: Protocols

2003-07-23 Thread chromatic
On Saturday, July 19, 2003, at 04:25 AM, Luke Palmer wrote: In Objective-C: id untyped = somefunction(); id typed = otherfunction(); If you send a message to C which isn't in the C protocol definition, you get warnings. Depending on the implementation, that assignment might be dynamicall

Re: Protocols

2003-07-19 Thread Sean O'Rourke
On 19 Jul 2003, Luke Palmer wrote: > [1] It would be totally cool to use a Haskell- or ML-style type > inference system, but those things just don't work in procedural > languages. Could you clarify what you mean by "don't work" here? ML has both assignment and type inference, so it seems like it

Re: Protocols

2003-07-19 Thread Steffen Müller
Luke Palmer wrote: [...] [1] It would be totally cool to use a Haskell- or ML-style type inference system, but those things just don't work in procedural languages. And they're very slow when not done at compile-time. Try a Haskell interpreter like hugs vs. a Haskell compiler like ghc. Steffen --