At 2:49 PM +0200 on 6/17/99, M. Uli Kusterer wrote:

>>Perhaps also allow 'of' to be replaced by '=' or 'is':
>>
>>      3) put item 3 (delim="3") of list into i        -- or "delimiter="
>>      4) put item 3 (delim is "3") of list into i     -- or "delimiter is"
>
> Horrible! This will collide with expressions

No it won't. You can put an expression there, ever (without this exension).
It's between the chunktype and the word "of."

>and looks like someone wanted
>to set the delimiter to a boolean expression. Also, in xTalk there is no
>such thing as using "=" or "is" to assign a value to a variable, one uses
>put. The only place where it's different is the "repeat for" construct,
>which I consider a weak spot in the language.

It's different in "repeat" because:

        repeat with put 1 into x to put 50 into x

is a nightmare. And it does not make sence, either.

Simularly in this item construct.

>
>>      put item 1 (delimted by "a" or "b" or "c" or...) of ...
>>      put tiem 1 (delim "a" or "b" or "c" or...) of...
>>      put item 1 (delim="a" or "b" or "c" or...) of...
>>      put item 1 (delim is "a" or "b" or "c" or...) of...
>
> Same here. This looks like someone using the "or" operator to assign a
>boolean expression as the delimiter.

I don't see how asking for something delimited by a or b can be construed
to look like a boolean expression.

>With a command like "answer" this is
>tolerable, as there it occurs only in a very limited scope, but with nested
>chunks and all that, code becomes unreadable if one intermingles boolean
>expressions and chunks. Please, don't do it.

Intermangles boolean expressions in chunks? Do you mean:

        put item 3 (delim=(a=b)) of...

Are you using true/false as delimiters

Or did you mean:

        put (a=b) into item 3 (delim=";") of...

But "a=b" is already confusing enough!

Chunks & bools are not intermixed that often.


>>And how long until we add in regexp support? It'd fit the syntax:
>>
>>      put item 1 (delimited by regexp "[a-zA-M]") of...
>>              -- or "regular expression" or whatever
>
> I think regexps this way are terrible, because they're unreadable.

It was thrown in to point out that the syntax is extendable.

Reply via email to