Re: coercing a list
Re: coercing a list
- Subject: Re: coercing a list
- From: Ric Phillips <email@hidden>
- Date: Fri, 31 Aug 2001 10:29:09 +1000
On 30/8/01 10:06 AM, "Emmanuel" <email@hidden> wrote:
>
At 1:32 +0200 30/08/01, Ric Phillips wrote:
>
>
> error "setTID parameter of TID must be a string"
>
>
Didn't it used to have to be a list of strings? (well, I mean, a list of
>
string)
>
Yes. and Richard made some excellent points in his post. But I learned
programming in the era of Knut's "Mythical Man Month" and I guess my
tendency is to simplicity, and readability. I also wanted the script object
I posted to make my code more readable (hence 'with' over 'given') and
intuitive (hence forcing a string). I always optimise my code for
maintainability-at-a-later-date over execution efficiency. It's a matter of
philosophical preference, and my approach certainly discards some of the
functionality of TIDs by accepting only strings, but in 99.9% of cases, a
single character string is what I intend a TID to be.
As for anyone unfamiliar with or learning about Text Item Delimiters - even
if you use the code I posted - do read the other posts in this thread
because there is some good info there.
Ric Phillips
Computer Laboratory Support Officer
Faculty of Humanities and Social Sciences
La Trobe University
9479 2792