tags:

views:

33

answers:

1

Hello Guys!

Situation: A protocol A implements a protocol B. B has some @optional and some (@)required methods.

Question: Is it possible in protocol A to set a method from B to the opposite (opt. to reeq. and vv.)?

Cheers!

+1  A: 

You probably mean protocol A extends/enhances B.

Making a required method optional would break existing code. You can use an implementation of A where B is needed, but you don't provide a method that is required - so going from req. to opt. doesn't make sense at all.

The other way around should work from a logical point of view. Have not tested it, though, but firing up your compiler should take less than a minute.

Eiko
+1 my thoughts exactly
Dave DeLong
Thx. I'm from Java. There interfaces (=protocol) are implemented.
Joschy
It's the same in Java, implementing and extending an interface are different things.
Eiko