[Info-vax] Long uptime cut short by Hurricane Sandy

David Froble davef at tsoft-inc.com
Fri Feb 1 18:18:18 EST 2013


Johnny Billquist wrote:
> On 2013-02-01 14:10, Bill Gunshannon wrote:
>> In article <kegdvc$fgc$1 at iltempo.update.uu.se>,
>>     Johnny Billquist <bqt at softjar.se> writes:
> 
> [... about languages that can do string subtraction... ]
> 
>>> SNOBOL to start with.
>>> I need to check, but I think both perl and python might as well. Trying
>>> to remember what other languages I've used which have strings as a
>>> rather basic data type...
>>>
>>
>> I said real programming languages.  :-)  While SNOBOL may qualify, perl
>> and python are bad hacks at best.  Hmmm....  Now that you mention it, I
>> wonder if MUMPS (aka ANSI M) does?  Now, where did I leave that manual...
> 
> :-)
> Unfortunately my brain is mushy, as usual. Neither perl nor python 
> actually had this. I know I've seen it somewhere else, but I can't 
> recall now.
> Oh well...
> 
> And I've never used MUMPS. But you have to admit that subtracting 
> strings is not really such a weird operation. At least I know that I've 
> wished that other languages had it from time to time. And it's not 
> conceptually a big step from string concatenation using '+'.
> 
>     Johnny
> 

If you want to argue symantics ....

I wouldn't call the removal of a character from within a string as a 
subtraction, just as I would not call the addition or replacement of a 
character within a string addition.

In the case of removal of a character, you're parsing the string with 
the character as a delimiter and then concatenating the front and back 
halfs.

Similar with insertion of a character, parse into preceding and trailing 
parts, and then re-assemble.

The capability of DCL being discussed is just some complex work 
performed by a small amount of source code.



More information about the Info-vax mailing list