Symbol>>capitalized?

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

Symbol>>capitalized?

Schwab,Wilhelm K
I would probably just send #asString to the symbols vs. adding the new
method.  I agree that returning an instance of the same class is the
correct behavior.

Bill


Terry Raymond:
RE: Symbol>>capitalized?

I would not recommend this. Normally, one would expect
that a transformation like #capitalized would return an
object of the same class. It would make more sense to
define #asCapitalizedString and change the code to use it.

Terry




Wilhelm K. Schwab, Ph.D.
University of Florida
Department of Anesthesiology
PO Box 100254
Gainesville, FL 32610-0254

Email: [hidden email]
Tel: (352) 846-1285
FAX: (352) 392-7029


Reply | Threaded
Open this post in threaded view
|

RE: Symbol>>capitalized?

J J-6
Well the problem he is having is that the symbol work is taking up a lot of
time, so he wants to avoid it.

As I understand it, the capitalization code is in Symbol and string just
uses it, yes?  Then can't you just switch it?  Have String be the class to
have the actual capitalization logic and Symbol just calls it and turns the
string into a Symbol?


>From: "Bill Schwab" <[hidden email]>
>Reply-To: The general-purpose Squeak developers
>list<[hidden email]>
>To: <[hidden email]>
>Subject: Symbol>>capitalized?
>Date: Tue, 02 Jan 2007 13:53:02 -0500
>
>I would probably just send #asString to the symbols vs. adding the new
>method.  I agree that returning an instance of the same class is the
>correct behavior.
>
>Bill
>
>
>Terry Raymond:
>RE: Symbol>>capitalized?
>
>I would not recommend this. Normally, one would expect
>that a transformation like #capitalized would return an
>object of the same class. It would make more sense to
>define #asCapitalizedString and change the code to use it.
>
>Terry
>
>
>
>
>Wilhelm K. Schwab, Ph.D.
>University of Florida
>Department of Anesthesiology
>PO Box 100254
>Gainesville, FL 32610-0254
>
>Email: [hidden email]
>Tel: (352) 846-1285
>FAX: (352) 392-7029
>
>

_________________________________________________________________
Get FREE Web site and company branded e-mail from Microsoft Office Live
http://clk.atdmt.com/MRT/go/mcrssaub0050001411mrt/direct/01/


Reply | Threaded
Open this post in threaded view
|

Re: Symbol>>capitalized?

Andreas.Raab
J J wrote:
> Well the problem he is having is that the symbol work is taking up a lot
> of time, so he wants to avoid it.

I don't think so. The obvious solution for this problem is to use "#foo
asString capitalized" which is both more explicit and avoiding the
symbol conversion.

Cheers,
   - Andreas

>
> As I understand it, the capitalization code is in Symbol and string just
> uses it, yes?  Then can't you just switch it?  Have String be the class
> to have the actual capitalization logic and Symbol just calls it and
> turns the string into a Symbol?
>
>
>> From: "Bill Schwab" <[hidden email]>
>> Reply-To: The general-purpose Squeak developers
>> list<[hidden email]>
>> To: <[hidden email]>
>> Subject: Symbol>>capitalized?
>> Date: Tue, 02 Jan 2007 13:53:02 -0500
>>
>> I would probably just send #asString to the symbols vs. adding the new
>> method.  I agree that returning an instance of the same class is the
>> correct behavior.
>>
>> Bill
>>
>>
>> Terry Raymond:
>> RE: Symbol>>capitalized?
>>
>> I would not recommend this. Normally, one would expect
>> that a transformation like #capitalized would return an
>> object of the same class. It would make more sense to
>> define #asCapitalizedString and change the code to use it.
>>
>> Terry
>>
>>
>>
>>
>> Wilhelm K. Schwab, Ph.D.
>> University of Florida
>> Department of Anesthesiology
>> PO Box 100254
>> Gainesville, FL 32610-0254
>>
>> Email: [hidden email]
>> Tel: (352) 846-1285
>> FAX: (352) 392-7029
>>
>>
>
> _________________________________________________________________
> Get FREE Web site and company branded e-mail from Microsoft Office Live
> http://clk.atdmt.com/MRT/go/mcrssaub0050001411mrt/direct/01/
>
>
>