Concrete Protocols

  • Hi,

    Has anybody found any documentation about concrete protocols? (That
    was supposed to be one new feature in Objective-C 2.0.)

    Re
    Phil
  • On Oct 31, 2007, at 1:27 AM, Philip Mötteli wrote:

    > Has anybody found any documentation about concrete protocols? (That
    > was supposed to be one new feature in Objective-C 2.0.)

    Protocols in Objective-C 2.0 can have methods that are marked as
    @required and @optional for classes that conform to the protocol,
    making them useful for describing delegate methods where protocols
    weren't before.

    Is this what you're referring to?

      -- Chris
  • On Oct 31, 2007, at 1:27 AM, Philip Mötteli wrote:

    > Has anybody found any documentation about concrete protocols? (That
    > was supposed to be one new feature in Objective-C 2.0.)
    >
    Do you mean Extensions?

    (Which are documented in the The Objective-C 2.0 Programming Language
    in the Categories and Extensions section: "Class extensions are like
    “anonymous” categories, except that the methods they declare must be
    implemented in the the main @implementation block for the
    corresponding class.")

    mmalc
  • Am 31.10.2007 um 11:51 schrieb Chris Hanson:

    > On Oct 31, 2007, at 1:27 AM, Philip Mötteli wrote:
    >
    >> Has anybody found any documentation about concrete protocols? (That
    >> was supposed to be one new feature in Objective-C 2.0.)
    >
    > Protocols in Objective-C 2.0 can have methods that are marked as
    > @required and @optional for classes that conform to the protocol,
    > making them useful for describing delegate methods where protocols
    > weren't before.
    >
    > Is this what you're referring to?

    I'm referring to:

    Concrete Protocols
    Objective-C, just like Smalltalk, doesn’t have multiple inheritance.
    This was a design decision, as it was with Java, because multiple
    inheritance can cause headaches. Instead, Objective-C has categories,
    which allow methods to be added to an existing class, and protocols
    that specify interfaces.

    Objective-C 2.0 adds the concept of a concrete protocol. Whereas a
    protocol is a definition of an interface, a concrete protocol adds
    some implementation detail as well. If the class that adopts the
    protocol doesn’t provide its own implementation, it will get the
    default implementation from the protocol.

    These features can be combined effectively with @optional methods in a
    protocol to provide a default implementation of @optional methods, but
    allow an implementer to replace them with a more useful method.
  • On Oct 31, 2007, at 6:30 AM, Philip Mötteli wrote:

    > I'm referring to:
    >
    > Concrete Protocols
    > Objective-C, just like Smalltalk, doesn’t have multiple inheritance.
    > This was a design decision, as it was with Java, because multiple
    > inheritance can cause headaches. Instead, Objective-C has
    > categories, which allow methods to be added to an existing class,
    > and protocols that specify interfaces.
    >
    It really would help if you provided a reference...

    <http://www.google.com/search?client=safari&rls=en-us&q=concrete+pro
    tocol+objective-c&ie=UTF-8&oe=UTF-8
    >
    ->
    <http://www.informit.com/articles/article.aspx?p=665128&seqNum=3>
    Behind the Scenes of Objective-C 2.0
    • By David Chisnall.
    • Nov 3, 2006

    I assume this is what you're referring to?

    The feature is not in Objective-C 2.0.

    mmalc
previous month october 2007 next month
MTWTFSS
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        
Go to today