[Cuis] Use of #deprecated: and/or #deprecatedExplanation:

Casey Ransberger casey.obrien.r at gmail.com
Sat Dec 28 05:46:33 CST 2013


Ah, okay, Squeak does it too then. 

So, the question is, do we need this sort of thing in Cuis? Because nothing says deprecated quite like MessageNotUnderstood :D

Anyhow it seems to me the reason you'd want this behavior is to let people know to stop using stuff that's present temporarily for back compat, or I suppose maybe to inform #unloadAllKnownPackages that the deprecated stuff can go?

Since back compat isn't a strong goal in Cuis, and we're more generally just inclined to rip stuff that isn't absolutely required out, I'd argue that we don't really need this. 

Counter arguments?

--C

> On Dec 28, 2013, at 3:18 AM, Frank Shearar <frank.shearar at gmail.com> wrote:
> 
> That's how they work in Squeak too: Deprecation below is a resumable
> Notification:
> 
> Object >> deprecated: anExplanationString
>    "Warn that the sending method has been deprecated."
> 
>    Preferences showDeprecationWarnings ifTrue:
>        [Deprecation signal: thisContext sender printString, ' has
> been deprecated. ', anExplanationString]
> 
> 
> Typically used like this:
> 
> Behavior >> compile: code classified: category notifying: requestor
> trailer: bytes ifFail: failBlock
>    self deprecated: 'Use #compile:notifying:trailer:ifFail:'.
>    ^self compile: code notifying: requestor trailer: bytes ifFail: failBlock
> 
> frank
> 
>> On 28 December 2013 02:19, Casey Ransberger <casey.obrien.r at gmail.com> wrote:
>> Juan: I believe in Pharo they have deprecation warnings. There's a
>> preference to turn them off, and IIRC the first time you hit a deprecated
>> method with them enabled, the system complains (can't remember if it's a
>> dialog or a debugger or what.)
>> 
>> 
>> On Fri, Dec 27, 2013 at 6:17 PM, Casey Ransberger <casey.obrien.r at gmail.com>
>> wrote:
>>> 
>>> When I do this, I usually do something like
>>> 
>>> self flag: #foo. "Need to remember to take care of foo. --cbr"
>>> 
>>> Main point of saying this is, it's nice to have a comment by the flag so
>>> when know who raised it and why.
>>> 
>>> 
>>>> On Fri, Dec 27, 2013 at 2:24 PM, Juan Vuletich <juan at jvuletich.org> wrote:
>>>> 
>>>> On 12/27/2013 3:24 PM, Germán Arduino wrote:
>>>> 
>>>> Hi:
>>>> 
>>>> In Squeak was common the use of #deprecatedExplanation: and also
>>>> #deprecate:
>>>> 
>>>> These methods are not present in Cuis, I'm interested in learn how manage
>>>> the ports of packages that use de deprecation messages. It's a good practice
>>>> use, for example, "self flag: 'comment'"?
>>>> 
>>>> Thanks.
>>>> 
>>>> --
>>>> Saludos / Regards,
>>>> Germán Arduino
>>>> www.arduinosoftware.com
>>>> 
>>>> 
>>>> We don't have a specific good practice for that... yet. What is the idea?
>>>> To let package users know that that method should not be used? What does
>>>> that method do in Squeak?
>>>> 
>>>> Cheers,
>>>> Juan Vuletich
>>>> 
>>>> _______________________________________________
>>>> Cuis mailing list
>>>> Cuis at jvuletich.org
>>>> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
>> 
>> 
>> _______________________________________________
>> Cuis mailing list
>> Cuis at jvuletich.org
>> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
> 
> _______________________________________________
> Cuis mailing list
> Cuis at jvuletich.org
> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org




More information about the Cuis mailing list