May 25, 2005
Hi,

> I think this whole thing would be simplified greatly if these were not keywords per se, but /properties/ instead. For example, if A-Arrays were a class/struct instead of a special type, one might imagine this instead of "if (x in y)":
>
> if (y.contains(x))
> if (! y.contains(x))
>
> or, if we must:
>
> if (y.in(x))
> if (! y.in(x))

I agree. This seems like a much more scalable approach.

L.


May 25, 2005
On Wed, 25 May 2005 02:04:01 -0700, Unknown W. Brackets wrote:

> Why don't we add "greater than" and "less than" too, then?

Now don't laugh, but I do use a language (Progress 4GL) that has 'EQ', 'NE', 'GT', 'LT', 'GE',  and 'LE' in addition to the usual operator tokens. Thus ...

  if Customer.Name eq "PARNELL" then
     if Account.Balance lt 200.00 then
         run AddTransaction( "DEPOSIT", 5.00, today).

is quite valid, if not morally corrupt ;-)

-- 
Derek Parnell
Melbourne, Australia
25/05/2005 7:06:38 PM
May 25, 2005
Derek Parnell wrote:
> On Wed, 25 May 2005 00:20:47 -0700, kris wrote:
> 
> [snip]
> 
>>Similarly:
>>
>>if (x.is(y))
>>if (! x.is(y))
> 
> 
> Fails if x is null though.
> 
This is true only if ".is()" is a form of virtual method, but I didn't see any reason whay it should be a virtual.
May 25, 2005
"Derek Parnell" <derek@psych.ward> wrote in message news:83ck0777i2dl$.rtyhbgftl1v7.dlg@40tude.net...
> On Wed, 25 May 2005 00:20:47 -0700, kris wrote:
>
> [snip]
>>
>> Similarly:
>>
>> if (x.is(y))
>> if (! x.is(y))
>
> Fails if x is null though.

Shouldn't fail. ".is" is hardly a virtual function, and in the end the same code will get generated, which will lead to the same result as the current "x is y".

L.


May 25, 2005
On Wed, 25 May 2005 11:17:59 +0300, Lionello Lunesu <lio@lunesu.removethis.com> wrote:
> Hi John!
>
>> You like strawman arguments, don't you Lio. ;-)
>
> They're my favorite :-)
>
>> I wouldn't exactly call these strawman arguments, though, unless you can
>> show us why.  These aren't arguments at all. They're merely statements of
>> feelings, preference, and emotion.  Strawman arguments are much more
>> serruptitious. :-)
>
> I've followed some philosophy course a while ago, but I really can't
> remember all these different names for common argumentations.
>
> Strawman was something like: instead of attacking position X, you claim that
> Y is like X and attack Y instead.
>
> The arguments used against Y might have nothing to do with the similarity
> between X and Y, and therefore would never apply to X.
>
> So I think this is indeed strawman: "This looks like basic and basic is
> bad". Anyway, I've simplified it, but the construct is clear :-)

According to this doc/page:
http://www.datanation.com/fallacies/index.htm

(and I'm not suggesting this document is authoritive in any way, just, interesting..)

Strawman is "the author attacks an argument different from (and weaker than) the opposition's best argument":
http://www.datanation.com/fallacies/straw.htm

So, it might be "strawman", but I think it's more of an:

"Undistributed Middle"
http://www.datanation.com/fallacies/undist.htm
"two separate categories are said to be connected because they share a common property"

They both "look like basic" (the common property), basic is bad, therefore this is bad.

Regan
May 25, 2005
> According to this doc/page: http://www.datanation.com/fallacies/index.htm

Very interesting site! Thank you.

> "Undistributed Middle"
> http://www.datanation.com/fallacies/undist.htm
> "two separate categories are said to be connected because they share a
> common property"
>
> They both "look like basic" (the common property), basic is bad, therefore this is bad.

Yep, you're right.. Thank's for pointing that out.

L.


May 25, 2005
Regan Heath wrote:
> On Tue, 24 May 2005 22:52:25 -0700, John Reimer <brk_6502@yahoo.com> wrote:

>>
>> I do not like "isnt."  Informal English contractions do not sit well  with me in a formal computer language.  It looks hackish, crude, and  lazy.
> 
> 
> D is not English. It doesn't have to follow the same rules. Further, not  everyone programming in D even speaks/reads English. I'm all for correct  English, where it matters, but IMO this is not one of those places.
> 

Yes, D is English... or inherits strongly from it.  Just look at all the operator names: class, ovrerride, interface, etc. We don't have to use English, but if we insist on it... it's nice to use a proper style.


>> !is is kinda ugly but workable.
> 
> 
> The mixing of punctuation and letters bothers me. Walter did say it would  in fact be two tokens "!" and "is", parsed using lookahead, but to me it  just looks like a logical negation of a variable called "is" (granted,  that would be illegal in D..)
> 
>> Maybe sticking with Lio's idea is not a bad idea: =!=.
> 
> 
> If we're going to keep using punctuation, why not keep "!=="?
> 
> I figured people we're bothered by the lack of symetry, "is" contains only  letters, "!==" contains punctuation, and you'd not immediately know one  was the opposite of the other.
> 
>> Or be out with it and provide another operator "not" so that we can say  "is not" like Kris mentioned.  It seems we're all pretty confused here  about what we want to do.
> 
> 
> My impressions are:
> 
> 1- We're after a shortcut for "!(a is b)".
> 2- Some dislike the lack of symetry between "is" and "!==".
> 3- Apparently "isnot" is copyrighted (or otherwise off limits).
> 4- Some dislike "isnt" as it isn't proper/correct english.
> 5- Some dislike the look of pascal, or perl, or <insert hated language  here>
> 
> So, the solution apparently, has to be:
> 1- A shortcut
> 2- To change "is" to punctuation OR use letters for it's opposite
> 3- Not "isnot"
> 4- Proper english
> 5- Not used by pascal, perl, <insert hated language here>
> 
> How about:
> 
> "is" changes to "eq"  (as in equal)
> "!==" changes to "ne" (as in not equal)
> 
>> We don't want pascali, but nonetheless, we still use some of it?  We  might as well go all or nothing: "=!=" or "is not" or mabye both?
> 
> 
> Good point, given that "!" and "is" would parse as two tokens and be  interpreted using look ahead, why cant "is" "not" be done the same way?  "is" would be a 'greedy' token.
> 
> Regan

Good suggestions.

-JJR
May 25, 2005
John Reimer wrote:
> Regan Heath wrote:
>> D is not English. It doesn't have to follow the same rules. Further, not  everyone programming in D even speaks/reads English. I'm all for correct  English, where it matters, but IMO this is not one of those places.
>>
> 
> Yes, D is English... or inherits strongly from it.  Just look at all the operator names: class, ovrerride, interface, etc. We don't have to use English, but if we insist on it... it's nice to use a proper style.
> 

Bleah, I meant "attribute" names and otherwise.  You get the idea.
May 25, 2005
On Wed, 25 May 2005 06:43:43 -0700, John Reimer <brk_6502@yahoo.com> wrote:
> John Reimer wrote:
>> Regan Heath wrote:
>>> D is not English. It doesn't have to follow the same rules. Further, not  everyone programming in D even speaks/reads English. I'm all for correct  English, where it matters, but IMO this is not one of those places.
>>>
>>  Yes, D is English... or inherits strongly from it.

My point was that D is a language, English is a language, they're both languages and they have many common factors, but, D !is English ;)

>> Just look at all the operator names: class, ovrerride, interface, etc. We don't have to use English, but if we insist on it... it's nice to use a proper style.

Key word above 'nice'. I don't think it's 'required'. I mean 'foreach', 'ifdef', 'endif' break the "rules" for English in that they are words jammed together with the space removed, if we can do that, why not remove the '?

> Bleah, I meant "attribute" names and otherwise.  You get the idea.

:)

Regan
May 25, 2005
Regan Heath wrote:
> On Wed, 25 May 2005 06:43:43 -0700, John Reimer <brk_6502@yahoo.com> wrote:
> 
>> John Reimer wrote:
>>
>>> Regan Heath wrote:
>>>
>>>> D is not English. It doesn't have to follow the same rules. Further,  not  everyone programming in D even speaks/reads English. I'm all for  correct  English, where it matters, but IMO this is not one of those  places.
>>>>
>>>  Yes, D is English... or inherits strongly from it.
> 
> 
> My point was that D is a language, English is a language, they're both  languages and they have many common factors, but, D !is English ;)
> 
>>> Just look at all the operator names: class, ovrerride, interface, etc.  We don't have to use English, but if we insist on it... it's nice to  use a proper style.
> 
> 
> Key word above 'nice'. I don't think it's 'required'. I mean 'foreach',  'ifdef', 'endif' break the "rules" for English in that they are words  jammed together with the space removed, if we can do that, why not remove  the '?
> 
>> Bleah, I meant "attribute" names and otherwise.  You get the idea.
> 
> 
> :)
> 
> Regan

Ah!

"isnt" be ugly and I'm stickin' to it! ;-)

<runs away covering eyes and ears>

-JJR