[Info-vax] Long uptime cut short by Hurricane Sandy
Johnny Billquist
bqt at softjar.se
Fri Feb 1 18:49:13 EST 2013
On 2013-02-02 00:18, David Froble wrote:
> 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.
It's normally called concatenation, yes.
> 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.
If you want to, you can describe it in the form of other (known)
operations, yes. Not that this is necessarily the only way to describe
it. Nor is it necessarily more correct.
> Similar with insertion of a character, parse into preceding and trailing
> parts, and then re-assemble.
You are describing a way it can be implemented. Which also, by the way,
depends on how strings are actually represented at a lower level.
> The capability of DCL being discussed is just some complex work
> performed by a small amount of source code.
Always. And it's all machine code in the end.
Johnny
--
Johnny Billquist || "I'm on a bus
|| on a psychedelic trip
email: bqt at softjar.se || Reading murder books
pdp is alive! || tryin' to stay hip" - B. Idol
More information about the Info-vax
mailing list