Protocols - plans in D6?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Protocols - plans in D6?

TimM-3
Are there any plans to make protocols more useful in D6?

If I've understood correctly - previous Dx versions don't
store protocol information anywhere, however it seems that D6 does
annotate packages with this.

However it seems that protocols aren't linked into the Code Mentor? So
if I want a class to conform to a protocol and then I start refactoring and
mess up its conformance, I don't really get somethng that actively tells me
about this.

It seems to that the protocol browser is sort of work in progress - and
it improves each release but its more of a "stay tuned" type of thing?

For me the protocol browser should provide the following (and maybe it does
and I have read old information and misunderstood some of its behavior).

1) Ability to create a protocol (available now)
2) Save the protocol somehow (available now in D6?)
3) Ability to mark a class as deliberately conformng to a protocol
(available now)
4) For those in #3, warn me if I break that conformance
5) Show classes that are conforming to a protocol but not marked as such
(e.g. answer the: I need a <plottable> object, what classes have that
behavior - even if they aren't marked this way). This has implications that
I
can add loose methods to an object to make it conform to a protocol I intend

There's probably a lot more to it than this, but that the basics - are these
things worth putting in the Feature request database?

Tim


Reply | Threaded
Open this post in threaded view
|

Re: Protocols - plans in D6?

rush
"TimM" <[hidden email]> wrote in message
news:[hidden email]...
> Are there any plans to make protocols more useful in D6?

I guess now is a bit late to squeeze those in. But I can not constrain my
self from adding few more to your list:

- generate dummy methods in some class so that it conforms to thge protocol
- generate methods for delegation of protocol in some class

--
http://www.templatetamer.com/
http://www.folderscavenger.com/


Reply | Threaded
Open this post in threaded view
|

Re: Protocols - plans in D6?

Schwab,Wilhelm K
Rush,

> I guess now is a bit late to squeeze those in. But I can not constrain my
> self from adding few more to your list:
>
> - generate dummy methods in some class so that it conforms to thge protocol

Does not making a class conform to a protocol do this?  If you simply
want to add the methods, there might be a way to drag the protcol to the
target class, but I would think one would ordinarily want conformance to
keep in synch as the protocol changes.  Sorry if I'm completely missing
your point.


Have a good one,

Bill


--
Wilhelm K. Schwab, Ph.D.
[hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: Protocols - plans in D6?

rush
"Bill Schwab" <[hidden email]> wrote in message
news:[hidden email]...
> Rush,
> Does not making a class conform to a protocol do this?  If you simply

Yes it does, I was not aware of that, thanks! Is there also a similar trick
for simple delegation? (i.e. generate methods that resend messages from
protocol to the instance variable).

rush
--
http://www.templatetamer.com/
http://www.folderscavenger.com/


Reply | Threaded
Open this post in threaded view
|

Re: Protocols - plans in D6?

Schwab,Wilhelm K
Rush,

> Yes it does, I was not aware of that, thanks! Is there also a similar trick
> for simple delegation? (i.e. generate methods that resend messages from
> protocol to the instance variable).

Not to my knowledge.

Have a good one,

Bill

--
Wilhelm K. Schwab, Ph.D.
[hidden email]