There is still a lot of confusion regarding dword support (double quoted
words) in epic4, and the changes made recently to epic5.

I would like to summarize the issues at hand, and then present a modest
proposal for epic5's future behavior.

The problem
-----------
There are 46 functions in epic4 that support "word lists".
The problem comes is, when a "word list" contains a double quoted word,
does that count as one word or multiple words?  Are the double quotes kept
or are they stripped away?

These are the functions
        afterw          beforew         chngw           cofilter
        common          copattern       corfilter       corpattern
        diff            findw           findws          fromw
        getopt          glob            globi           indextoword
        insertw         joinstr         leftw           match
        maxlen          midw            notw            numsort
        numwords        pattern         pop             prefix
        push            remw            remws           restw
        revw            rfilter         rightw          rmatch
        rpattern        shift           sort            splice
        tow             uniq            unshift         unsplit
        word            wordtoindex

Functions that are not on this list should not have changed behavior 
between epic4 and epic5 on the basis of double quoted word support!

Some of these functions support double quoted words fully (findw, getopt,
match, maxlen, word), and some of them support double quoted words only
when /xdebug extractw is on (chngw, insertw, midw, notw), and some 
functions support double quoted words, but strip the double quotes out
(joinstr, common, numsort, pattern), and some functions are *broken* when
you use double quoted words (afterw, beforew, fromw)

There is no rhyme or reason for why there are so many special cases.
This has just grown up over the course of epic's life and there has 
never been a project to rationalize and normalize the behavior until now.

The proposal
------------
We will, by default, make all of the above functions, except for 
        getopt          glob            globi
not support double quoted words.  That means, double quoted words have
no special meaning, and double quotes are considered regular old characters.

We will allow you, if you do /xdebug dword, to turn on full dword support
in all of the above functions.  "Full support" is still a bit nebulously
defined, and may be subject to change.  For the moment, it means if you
have a dword on the input, it will be a dword on the output.  Dwords will
only count as 1 word.

We will change /xdebug extractw so it only affects the $* numeric expandos.
It will no longer have any effect upon built in functions or anything else.

This will allow you, the scripter, to determine
        1) Whether you want dword support for $*
        2) Whether you want dword support for function calls
on an independant basis.  Right now, you can't sever these two without
toggling /xdebug extractw.

Remember, functions that are not on the above list are not affected by 
this proposal (unless I made an inadvertant exclusion), and they should
behave the same in epic4 and epic5.

There you have it.  Comments?
Jeremy
_______________________________________________
List mailing list
List@epicsol.org
http://epicsol.org/mailman/listinfo/list

Reply via email to