[squeak-dev] Re: The Trunk: TrueType-nice.13.mcz
Andreas Raab
andreas.raab at gmx.de
Tue Jan 19 04:23:12 UTC 2010
Colin Putney wrote:
> On 2010-01-18, at 10:34 AM, Nicolas Cellier wrote:
>
>> BTW, I see much code like:
>> 'true' asByteArray
>> Not that it costs that much CPU, but I'd like to make it a literal...
>> However, I'd like to preserve the initializing code and semantics.
>> This solution is not really satisfying:
>> "'true' asByteArray" #[116 114 117 101]
>
> I prefer this option, actually. 'true' asByteArray is bogus to begin with.
It's not. Check the comment:
['true' asByteArray] -> ["Version 1.0 TTF file"
"http://developer.apple.com/textfonts/TTRefMan/RM06/Chap6.html
The values 'true' (0x74727565) and 0x00010000 are recognized by the
Mac OS
as referring to TrueType fonts."
^Array with: 0 "only one font"
].
Since this code has no performance implication whatsoever, I find 'true'
asByteArray vastly more readable and intention revealing than #[116 114
117 101].
Cheers,
- Andreas
More information about the Squeak-dev
mailing list
|