Re: OOPs!! When is a class not a class? (Re: Number/Specificality/Archetypes in Language)
|From:||Keith Gaughan <kmgaughan@...>|
|Date:||Monday, September 27, 2004, 21:38|
Philippe Caquant wrote:
> Forgot to look at the "reply to" address... Jeg sender
>> --- Pablo Flores <pablodavidflores@...>
>>I didn't fancy the problem. See what Our Beloved David
>>Flanagan says in the Holy Book,
Philippe, you needn't snipe!
>> chapter 11, section
>>"Converting objects into primary values" (my
>>So, is it a string ?
It's a string. Strings are objects, numbers are not. The concatenation
will work just fine. Ambiguous it is, but not to the degree it seems.
>>Said John Cowan:
>>"It's a matter of point of view. If you conceive of concatenation
>>as "string addition" (in the same way that we conceive of integer
>>and floating-point addition as being "the same thing", though to the
>>CPU they are utterly different), then it makes sense to use the same
>>operator for them. But if you conceive of concatenation and addition
>>as two different things, it makes sense to use two different operators."
>>I agree. To me, these are completely different
>>concepts and there is no reason to use the same symbol
>>for both, except maybe that there wasn't any common
>>symbol at hand any more, which would be a very bad
Then VB's the language for you! You have "&" for concatenation and "+"
>>I don't know Ada, but this looks nice. My idea was to
>>represent all operator concepts by 3-char mnemonics,
>>like "ADD" for Addition, "CCT" for concatenating,
>>etc... well, looks rather much like Assembler, doesn't
>>it ? So you could write programs using these codes,
>>and then a processor would translate it into Cobol,
>>there must be some problem somewhere).
But what about the poor sod who has to maintain it later?
>>Said Keith Gaughan:
>>an assignment. That way, it doesn't get mixed up when you're doing
>>concatenation or addition."
See above. ;-D
>>"I don't know if you've heard of it, but the language Tcl similarly to
>>how you've described Pick BASIC, treating everything
>>as a string."
>>Well, TCL is used on Pick Systems. It's more or less
>>at the same level as SQL on other systems. There is
>>also something very unfriendly called "PROC", allowing
>>you to write scripts. PROC is the worst part of Pick
>>Systems. But I cannot see that Pick Basic "treats
>>everything like a string" - or maybe you mean that it
>>parses the value before trying to do some arithmetic
>>operation on it ?
No, Tcl (note the case) is a far different beastie. It's pronounced
"tickle", and means "Tool command language". The ideas (minimalist
interpreter, pass-by-name, universal type, etc.) are quite cool, but
coming to the language can be quite a shock as it looks deceptively
like part of the C family. However, it's terribly useful, and the
Tk toolkit, though ugly as sin, is great for building GUIs.
Slam it, as with anything I mention that you might be unfamiliar with,
into Google for more details.
>>"The use of ":" for concatenation is very unusual!"
>>I think it was more common earlier. ":" is also used
>>(by Pick) in the PRINT instruction:
>>will print the word without a linefeed after it,
>>will send a linefeed after the string. And it is not
>>so stupid, because there seem to be more cases where
>>you would be happy to get the linefeed without
>>to add "\n" or other esoteric codes than the
>>( ";" is used to separate instructions on a same
>>but no Pick instruction has to be ended by ";", or
>>".", or whatever)
Now that's *incredibly* unusual for a BASIC! The usual way of stopping
the linefeed (going back to the original Dartmouth BASIC, if I'm
correct) is with ";", whereas the statement seperator is ":".
>>(To John Cowan):
>>"Apache" means "malfaiteur, bandit" in French (and
>>also "Apache", of course), but this sounds a little
>>outdated by now. Anyway, I guess it's not
>>correct at all.
Oddly enough, in English (or at least in my dialect) "cowboy" would be
translated into French as "malfaiteur, bandit". It's typically used to
refer to "cowboy builders", i.e. construction firms that do a shoddy
job and charge a fortune to do it.
Keith Gaughan -- talideon.com
The man who removes a mountain begins
by carrying away small stones...
...to make place for some really big nukes!