Post #101,697
5/13/03 4:33:45 PM
|
Here we go
I'm sure you'll argue, but what the fuck...you seemed determined to be contrary, as if every thing I say is a direct challenge to you personally.
Your example is exactly what I DIDN'T mean. Someone in J-world invented a piss-poor mimic of set theoretic ideas - so what? There can still be null pointers flying around and they can still cause destruction. In any case I think it's in a utility class definition so it's not natively part of the language, is it?
APL has no types. It has arrays. An array can be empty but still exist. THAT is a real "null". But, "null" has a size - 0. It's the size of null that is 0, NOT null itself.
Is that clear? I have the greatest respect for you skill but I'm damn sick of you and Peter just dismissing what I say as if I were some pimply ignorant teenager.
If you find a REAL example of an idiom that is built around sets other than APL, let me know.
(BTW historically APL was invented as a way to describe algorithms, not as a language - that is probably why it is such a perfect langauge.)
-drl
|
Post #101,702
5/13/03 4:45:38 PM
|
Re: Here we go
You asked. I provided. Go take a flying leap if you didn't want a response. I'm sick of your crusty, argumentative "I'm the authority" diatribes around here. You originally said: In set theory, there is a gigantic difference between "nothing" (empty set) and "non-existence". No kidding, Sherlock. I showed you how that difference is represented in Java. An array can be empty but still exist. \nSet foo = new Set();\nSystem.out.println(foo.size()); // prints 0\n This is your "nothing" or "empty set". Your "non-existence" in Java is represented by a null. The terminology may not be the same, but the same functionality is there. I'm damn sick of you and Peter just dismissing what I say as if I were some pimply ignorant teenager. Then quit writing stupid ignorant blather as if you were some pimply ignorant teenager. Or learn to express yourself better (another sign of adulthood). Or STFU. Your choice. This is my last response to you until you grow up, ace.
Regards,
-scott anderson
"Welcome to Rivendell, Mr. Anderson..."
|
Post #101,708
5/13/03 4:58:35 PM
|
Amazing
When you declared Set s=null, you made a set and assigned it a value. The fact that you made a set means that it exists.
This is COMPLETELY DIFFERENT than the way an APL array can be empty - it's not even remotely the same thing. If something is non-existent in APL and you try to refer to it, the interpreter stops (other things being default equal). That would never happen in any case, because one just doesn't make that kind of error.
As far as Conrad's SQL statement, this isn't even worth commenting on, because SQL is not a development idiom.
If you were me. you'd be frustrated talking to walls as well.
-drl
|
Post #101,710
5/13/03 5:02:52 PM
|
Re: Amazing
If something is non-existent in APL and you try to refer to it, the interpreter stops (other things being default equal). If you have a null object in Java, and you try to use it, the interpreter stops. Not the same != can't be used the same. I'm really not catching what you're on about here. "If something is non-existent". How do you represent something that is non-existent in APL then?
Regards,
-scott anderson
"Welcome to Rivendell, Mr. Anderson..."
|
Post #101,715
5/13/03 5:32:07 PM
|
Re: Amazing
It's a very subtle and difficult point.
You can't model non-existence with something that exists and has a special value, no matter what it is. So "Set s=null" is emptiness, not non-existence. Strong typing means that everything you refer to HAS to exist. Set s = new HashSet() is not emptiness, because s now has an identifiable property. It's like an empty glass of water - s is the glass, not the water.
In APL, an empty array is in an intermediate area - it exists but has no properties. BY DEFINITION, size 0 = empty. So you can safely deal with emptiness because your in no danger of causing an NPE. Here's an example:
[link|http://www.csm.astate.edu/~rossa/cs3543/apl.html|http://www.csm.astat...a/cs3543/apl.html]
I have to run but will get back to this interesting topic. Please, let's bury the hatchet - IN CONRAD!
-drl
|
Post #101,721
5/13/03 5:51:19 PM
|
Wow. My first exposure to APL
and Brainf*ck seems to be not too bad at all.
But you are right. APL's empty is closer to Smalltalk's Null than Java's null. Correct me somebody, but I think Smalltalk's Null can be made to behave exactly like APL empty if so desired. E.g. 0*nil would now yeild doNotUnderstand exception, but you can handle some messages in Null and in Number to make it evaluate to nil.
--
Less Is More. In my book, About Face, I introduce over 50 powerful design axioms. This is one of them.
--Alan Cooper. The Inmates Are Running the Asylum
|
Post #101,726
5/13/03 6:04:05 PM
|
Same as in Objective C
Regards,
-scott anderson
"Welcome to Rivendell, Mr. Anderson..."
|
Post #101,732
5/13/03 6:50:46 PM
|
Re: Amazing
deSitter: It's a very subtle and difficult point.
Its even more subtle than that. Its not merely empty vs non-empty, but APL doesn't distinguish between a single number and an array of length one.* In other words, the number 1 can be treated as a number, or as an array of a single element.
Now this is makes for some convient shortcuts in programming (much like returning a zero when unboxing a null pointer), but I don't think it is mathematically very accurate. In Math**, a set of things and a thing are not the same thing***.
Footnotes:
* Assuming I correctly remember what little APL I ever knew.
** Assuming I correctly remember what little set theory I ever knew.
*** Do I get extra points for using the word thing(s) three times in one sentence?
-- -- Jim Weirich jweirich@one.net [link|http://w3.one.net/~jweirich|http://w3.one.net/~jweirich] --------------------------------------------------------------------- "Beware of bugs in the above code; I have only proved it correct, not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)
|
Post #101,750
5/13/03 9:03:03 PM
|
Heh.
*** Do I get extra points for using the word thing(s) three times in one sentence? Only if you publish it as "Thing Theory". :D
Many fears are born of stupidity and ignorance - Which you should be feeding with rumour and generalisation. BOfH, 2002 "Episode" 10
|
Post #101,767
5/13/03 11:09:01 PM
|
ROFL
-drl
|
Post #101,718
5/13/03 5:40:08 PM
|
No
>>>>>>>>>>>>>> When you declared Set s=null, you made a set and assigned it a value. The fact that you made a set means that it exists. <<<<<<<<<<<<<<
No.
When I do the above, I've declared a variable (a nest, a hook) that can be assigned a set (set can be placed in the nest, hung on a hook). I did not create any sets. Not even 0-sized sets. "null" is not a set.
--
He walks around, talking to himself. On the phone.
|
Post #102,696
5/20/03 12:54:07 AM
|
Hey Ross, it's only a model.
Like sets are. Remember your Goedel. None of this matters. ;-)
But I am curious, how do you represent in code, in any language, the complement of "the set of all sets"? ;0)
And, set a property to be "Cardinality".
bcnu, Mikem
The soul and substance of what customarily ranks as patriotism is moral cowardice and always has been...We have thrown away the most valuable asset we had-- the individual's right to oppose both flag and country when he (just he, by himself) believed them to be in the wrong. We have thrown it away; and with it all that was really respectable about that grotesque and laughable word, Patriotism.
- Mark Twain, "Monarchical and Republican Patriotism"
|