Ned Freed | 1 Feb 1998 23:05

Re: arguments and strings

> Currently, concensus on arguments is that "a" "b" => "ab".  But for a
> command like
> 	fubar "a" "b";

> where fubar is a command that takes two string arguments, this is
> ambiguous; this is either the same as

> 	fubar ("a") ("b");

> which is a "legal" construct, and

> 	fubar "ab";

> which would be an error.

> We need to resolve this, either by making all strings enclosed in
> string-lists, or by making strings not (automatically) concatenate.

> Opinions?

I would suggest that instead of overloading () in this way that we instead
consider the use of commas. Comma separated parameter lists aren't exactly
unheard of...

				Ned

Ned Freed | 2 Feb 1998 02:04

Re: arguments and strings

> > Date: Sun, 01 Feb 1998 14:05:29 -0800 (PST)
> > From: Ned Freed <Ned.Freed <at> innosoft.com>
> >
> > I would suggest that instead of overloading () in this way that we instead
> > consider the use of commas. Comma separated parameter lists aren't exactly
> > unheard of...

> Hm, that's probably the right thing to do.

> I'd also be in favor of changing stringlists to use some other set of
> brackets; I'm pretty sure Rob mentioned this, but I can't remember to whom.

You've already committed {} and (), that leaves [] and <>. I dislike <> since
it may interfere with future expression syntax; I'd therefore recommend [],
which I think is what Rob wanted as well. Rob?

				Ned

Rob Earhart | 3 Feb 1998 19:53
X-Face
Picon
Favicon

Re: arguments and strings

Ned Freed <Ned.Freed <at> innosoft.com> writes:
> You've already committed {} and (), that leaves [] and <>. I dislike <> since
> it may interfere with future expression syntax; I'd therefore recommend [],
> which I think is what Rob wanted as well. Rob?

  Yup; I dislike using <> for the same reason, and there's a
reasonable amount of precendent for using [] for lists (SML, Perl, and
Prolog come to mind; I'm sure there're many more).

  Comma seperated parameter lists "look" right when used with
languages with parenthesized function calls; I'm not sure they'd look
quite as nice in Sieve.  I think I'd prefer disallowing string
concatenation; I don't have any strong feelings about it, though.

  )Rob

Tim Showalter | 1 Feb 1998 23:49
Picon

Re: arguments and strings

> Date: Sun, 01 Feb 1998 14:05:29 -0800 (PST)
> From: Ned Freed <Ned.Freed <at> innosoft.com>
> 
> I would suggest that instead of overloading () in this way that we instead
> consider the use of commas. Comma separated parameter lists aren't exactly
> unheard of...

Hm, that's probably the right thing to do.

I'd also be in favor of changing stringlists to use some other set of
brackets; I'm pretty sure Rob mentioned this, but I can't remember to whom.

--

-- 
                                          Tim Showalter tjs+ <at> andrew.cmu.edu


Gmane