Having just read this again, I'd be inclined to use a local namespaced
variable rather than a global one just because it might be used across
threads. If that's the case, doesn't VAR:s boil down to the same thing?

Cheers,

Phil

Phil Dawes wrote:
> Sweet - thanks for the tips (this'll be useful elsewhere in my coding 
> too). Shall I make the changes or have you done this already in your 
> local copy?
> 
> -Phil
> 
> Slava Pestov wrote:
>> Hi Phil,
>>
>> I noticed that in several places in extra/csv, you call init-vars,
>> which sets the delimiter variable if it isn't set already. A better
>> solution is to use normal variables instead of VAR:s, and set the
>> default value globally in a top-level form of the source file:
>>
>> CHAR: , delimiter set-global
>>
>> Then you can call 'delimiter get' to get the value anywhere it is
>> needed. The user can still call with-delimiter to override the value
>> if needed.
>>
>> Finally, I would write
>>
>> "\n\"" delimiter> suffix member?
>>
>> as
>>
>> [ "\n\"" member? ] [ delimiter get = ] bi or
>>
>> This avoids creating an intermediate sequence; furthermore the
>> compiler optimizes calls to 'member?' where the sequence is a literal,
>> by expanding it into a 'case' form.
>>
>> Slava
>>
>> -------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
>> Build the coolest Linux based applications with Moblin SDK & win great prizes
>> Grand prize is a trip for two to an Open Source event anywhere in the world
>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> _______________________________________________
>> Factor-talk mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/factor-talk
>>
> 
> 
> 
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Factor-talk mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/factor-talk
> 




-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to