[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Cfengine-develop] Re: Homework
From: |
Andrew Stribblehill |
Subject: |
Re: [Cfengine-develop] Re: Homework |
Date: |
Thu, 6 Mar 2003 12:02:25 +0000 |
User-agent: |
Mutt/1.5.3i |
Quoting Andrews, Martin <address@hidden> (2003-03-06 11:59:29 GMT):
> Andrew,
>
> I expected you meant this sort of mechanics for multiple interpolation - I
> just think it is really dangerous and wanted to see an example use case. If
> we did go with such a feature how about very explicit function-like wrappers
> for it like:
>
> this = ( "that" )
> exactly = literal( "do not substitute $(this)")
> doubly = substitute( "$(exactly)" )
>
> giving
>
> this="that"
> exactly="do not substitute $(this)"
> double="do not substitute that"
The way people expect functions to work is that if strings are
implicitly interpolated, this will happen before the function is
given the string.
Python has a wart called r'' which lets you ensure that slashes
aren't interpreted as escape codes. We _could_ go that way to say for
example, l'do not substitute $(this)' but as you may have guessed
from my pejorative language, I don't like that.
Or we could go the Perl way and use '' for non-interpolated strings
and "" for interpolated ones, with the obvious drawbacks in that
scheme.
There's no perfect answer to this question.
--
MALIN
SOUTHWEST BACKING SOUTH 5 TO 7, PERHAPS GALE 8 LATER. RAIN LATER.
GOOD OCCASIONALLY MODERATE
- Re: [Cfengine-develop] Re: Homework, (continued)
RE: [Cfengine-develop] Re: Homework, Andrews, Martin, 2003/03/05
RE: [Cfengine-develop] Re: Homework, Andrews, Martin, 2003/03/06
- Re: [Cfengine-develop] Re: Homework,
Andrew Stribblehill <=
RE: [Cfengine-develop] Re: Homework, Andrews, Martin, 2003/03/06
Re: [Cfengine-develop] Re: Homework, Mark Burgess, 2003/03/06
Re: [Cfengine-develop] Re: Homework, Luke A. Kanies, 2003/03/06
RE: [Cfengine-develop] Re: Homework, Andrews, Martin, 2003/03/06