On Sun, 24 Sep 2000, Jon Stevens wrote:

> >> The more that I think about it, the more I'm -1 on $!foo. The reason is that
> >> it makes us start to look like Perl syntax where you have all sorts of
> >> "modifiers" on variables and that gets confusing for people very quickly.
> > 
> > I rather like the shorthand. I think people would get used to some
> > form of shorthand. We could choose a better notation.
> > 
> > Maybe we could just have a configuration option for undefined
> > values. If it's undefined then it come's out as an empty
> > string, or whatever you want.
> 
> Right, I agree that the shorthand chosen is fine $!. What I'm worried about
> is that this will just be the start of the requests for more shorthand
> things.

I suppose people could ask for things like:

$#list
  $_
#end
 
Which is certainly awful, but that example is a little out
of hand.

> >> So, to take your proposal one step further:
> >> 
> >> <input type="text" name="email" value="$tool.Value($email, "")">
> >> 
> >> That seems perfectly acceptable and is a valid way right now to solve the
> >> problem without any core language changes.
> > 
> > Again, the $!foo reference could be valid but if you prefer
> > to use $tool.Value($email, "") then you can. I actually think most people
> > would prefer to type:
> > 
> > <input type="text" name="email" value="$!foo">
> > 
> > over
> > 
> > <input type="text" name="email" value="$tool.Value($email, "")">
> 
> Probably, but the problem with $!foo is that you can't have a default option
> specified. Think of it this way...you code up your entire site with $!foo
> and then you realize that you need to specify a default option for
> everything...what do you do?

For $!foo or $foo we probably could have a configuration
option for the desired output. I think that's what Bob
wanted for iSpock. But if you set the output to be an
empty string if a reference is undefined then you 
could simply write:

<input type="text" name="email" value="$email">


> I think that the different notation is simply using a context tool for it.
> :-)

That's totally cool. If that's what's decided is best, but I
think at least a configuration option would be better so
that you didn't have to use a context tool thing to
emit an empty string when a reference isn't defined.

jvz.

-- 

Jason van Zyl
[EMAIL PROTECTED]

Reply via email to