[Cuis-dev] Why can't you send to super on private (pvt*) methods?
luchiano at gmail.com
Mon Jun 10 22:18:28 PDT 2019
On Mon, Jun 10, 2019 at 10:24 PM Juan Vuletich via Cuis-dev <
cuis-dev at lists.cuis.st> wrote:
> BTW, we'd really make methods such as #setCollection:,
> #setNumerator:denominator:, actually all methods set*, all methods
> private* and all methods in a 'private*' category actually private...
> For example the comment at #privateSetX:setY: looks so silly.
How would you do that? Changing isPvtSelector to see if the methods
implementing it are only present in 'private' categories? Extending it to
include 'private' prefix sounds reasonable, but I'm not sure about 'set'
prefix, because some objects are not intended to be immutable and it might
make sense to have public selectors like #setName: for example (although I
would probably call it #name: instead).
I know some of my code would break, for example sometimes I allow objects
that play a "factory" role to call setters of other objects (this might be
a bad thing, still not decided). It would be interesting to see how many
methods in the current image would stop compiling if we do this, tho...
even if we don't make this change, finding out where this (arguably black)
pattern is used might be interesting...
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Cuis-dev