Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: On mutability and sameness

From: kenneth:nwinet at: 17-Jun-2001 10:42

Joel, Much appreciation for your discussions in this list.
> Kind of datatype Comparison to be performed > ---------------- -------------------------- > 1) Simple data Compare the data values > 2) Reference data Compare the "pointer" values > 3) Reference data Compare the "final data" values > > > ...is there a referenced? vs. non-referenced? type function? > > Not AFAIK. The following is a quick cut at a function that > tells whether the current value of a word is of a reference > type.
May I propose or suggest that RT consider adding a 'simple?' function (the word seems to be common to the thread whereas sharable? seems to add a nuiance not explicit in your chart above) which could act as a lawman for these issues.
> sharable?: func ['w [word!]] [ > found? any [ > series? get w > any-function? get w > object? get w > ] > ] > > It may be used as follows: > > >> a: "123" == "123" > >> sharable? a == true > >> a: 123 == 123 > >> sharable? a == false > >> a: 12:30 == 12:30 > >> sharable? a == false > >> a: [1 2 3] == [1 2 3] > >> sharable? a == true > > No warranties expressed or implied! I believe it to be true > for the "ordinary data" cases, but it may require tweaking > for the more esoteric REBOL-specific types.
But I *want* warranties! Deputy, round up a posse! I have a warrant here for any genius language designer that leaves too many undefined issues hanging around the saloon. I don't give a lick for what that there Godel hombre has to say about it. While we're at it, let's throw in a few divide by zero's laws just for kicks. It may be infinity to those there mathmatical fella's, but us programmer's around these here parts usually just define the result to be zero. But Sheriff, my boy told me that 0/0 is undefined soes we might as well make a law that it's ta be nought... wouldn't it be more correct for sum number there divided by nought to be a really big number like those mathmedical fella's says? Now deputy, if they want to test for zero, they can test for zero, but I'm telling ya we got ta have a civilized town here. That means no shootin' irons in the town limits and zero begets zero whether ya multiply or divide. Well I don't rightly know Sheriff, sounds kinda dangerous like to cipher thata way. BTW, Sheriff didya notice they got this cp thing that does the same thang as copy? I saw that there deputy, and I plan to make eunix atta those there rustlers as soon as we get this zero issue all cleared up. Now let's go down to the corral and see what Ike and his boys are up to. OK. Well of course.