Jump to page: 1 25  
Page
Thread overview
!(null is hkey) ??
Jul 23, 2004
Matthew
Jul 23, 2004
Sean Kelly
Jul 23, 2004
Andy Friesen
Jul 23, 2004
Derek Parnell
Jul 23, 2004
Arcane Jill
Jul 23, 2004
Kris
Jul 23, 2004
James McComb
Jul 23, 2004
Ben Hinkle
Jul 23, 2004
Sean Kelly
Jul 23, 2004
James McComb
Jul 23, 2004
Andy Friesen
Jul 23, 2004
James McComb
Jul 23, 2004
Berin Loritsch
Jul 23, 2004
Matthew
Jul 23, 2004
Berin Loritsch
Jul 23, 2004
Paolo Invernizzi
Jul 23, 2004
Matthew
Jul 23, 2004
Kris
Jul 24, 2004
J C Calvarese
Jul 24, 2004
Kris
Jul 24, 2004
J C Calvarese
Jul 26, 2004
Berin Loritsch
Jul 23, 2004
Russ Lewis
Jul 23, 2004
Andy Friesen
Jul 23, 2004
Berin Loritsch
Jul 23, 2004
Andy Friesen
Jul 23, 2004
Matthew
Jul 23, 2004
Russ Lewis
Jul 23, 2004
Andy Friesen
Jul 23, 2004
Russ Lewis
Jul 23, 2004
Andy Friesen
Jul 23, 2004
Matthew
Jul 23, 2004
Hauke Duden
Jul 23, 2004
Kris
Jul 23, 2004
Matthew
Jul 23, 2004
Matthew
Jul 23, 2004
Ilya Minkov
Jul 23, 2004
Ben Hinkle
Jul 23, 2004
James McComb
Jul 23, 2004
Ben Hinkle
Jul 24, 2004
Regan Heath
Jul 25, 2004
Arcane Jill
Jul 25, 2004
J C Calvarese
Jul 26, 2004
h3r3tic
Jul 23, 2004
Matthew
Jul 23, 2004
Sha Chancellor
Jul 24, 2004
J C Calvarese
July 23, 2004
While I like the use of is - for one thing, I can reorder the expression to read more naturally, i.e. "hkey is null" rather than "null === hkey" - I don't like the need to ! the expression.

Presumably the reason for preferring "is" over "===" is that it reads better, which it does in the === case.

    "hkey is null"

is better than

    "hkey === null"

But it seems a starkyl retrograde step to have write "!(hkey is null)" instead of "hkey !== null"

    "hkey !== null"

is (much!) better than

    "!(hkey is null)"

So, if "!(hkey is null)" is not to people's tastes, as I suggest is the case, then we might end up with an inconsistent use of "is" for null, and "!==" for not null. That is not good.

I suggest that, either:

(i) we have the keyword modifier "not", as in "hkey is not null", or have an isnot keyword, as in "hkey isnot null", or

(ii) forget about is for testing null-ness.

Thoughts?




July 23, 2004
>Matthew wrote:

> I suggest that, either:
> 
> (i) we have the keyword modifier "not", as in "hkey is not null", or have an isnot keyword, as in "hkey isnot null", or
> 
> (ii) forget about is for testing null-ness.
> 
> Thoughts?

I agree.  Having to add an extra layer of perens just to use 'is' in these situations seems silly.  Whichever of the above would be easier to parse has my vote.


Sean
July 23, 2004
Matthew wrote:

> While I like the use of is - for one thing, I can reorder the expression to read more naturally, i.e. "hkey is null"
> rather than "null === hkey" - I don't like the need to ! the expression.
> 
> Presumably the reason for preferring "is" over "===" is that it reads better, which it does in the === case.
> 
> I suggest that, either:
> 
> (i) we have the keyword modifier "not", as in "hkey is not null", or have an isnot keyword, as in "hkey isnot null", or
> 
> (ii) forget about is for testing null-ness.
> 
> Thoughts?

Please!  'not in' and unary 'not' would be nice too.

The price we pay, having an operator with embedded whitespace, seems well worth the trouble for having syntax which is self-evident to anybody, whether or not they have even heard of the language.

 -- andy
July 23, 2004
On Fri, 23 Jul 2004 11:27:44 +1000, Matthew wrote:

> While I like the use of is - for one thing, I can reorder the expression to read more naturally, i.e. "hkey is null" rather than "null === hkey" - I don't like the need to ! the expression.
> 
> Presumably the reason for preferring "is" over "===" is that it reads better, which it does in the === case.
> 
>     "hkey is null"
> 
> is better than
> 
>     "hkey === null"
> 
> But it seems a starkyl retrograde step to have write "!(hkey is null)" instead of "hkey !== null"
> 
>     "hkey !== null"
> 
> is (much!) better than
> 
>     "!(hkey is null)"
> 
> So, if "!(hkey is null)" is not to people's tastes, as I suggest is the case, then we might end up with an inconsistent use of "is" for null, and "!==" for not null. That is not good.
> 
> I suggest that, either:
> 
> (i) we have the keyword modifier "not", as in "hkey is not null", or have an isnot keyword, as in "hkey isnot null", or
> 
> (ii) forget about is for testing null-ness.
> 
> Thoughts?

Too obvious!

For our younger coders this really should be "(hkey is null) not!" ;-)

Joking aside, this is a reasonable suggestion, if only for consistancy sake. I think I prefer the "is not" over "isnot". Readability should be one of the goals for a programming language.

-- 
Derek
Melbourne, Australia
23/Jul/04 11:52:58 AM
July 23, 2004
Know wot' u mean guv', but "is not" seems a tad verbose, whereas:

if (x not null)

sounds fine to me (D "is not" COBOL :~)

However, I think the best suggestion was put forward by Ben:

if (x AINT null)

<g>

(forgive me if I attributed that beauty to the wrong person)


"Matthew" <admin.hat@stlsoft.dot.org> wrote in message news:cdppih$1ab1$1@digitaldaemon.com...
> While I like the use of is - for one thing, I can reorder the expression
to read more naturally, i.e. "hkey is null"
> rather than "null === hkey" - I don't like the need to ! the expression.
>
> Presumably the reason for preferring "is" over "===" is that it reads
better, which it does in the === case.
>
>     "hkey is null"
>
> is better than
>
>     "hkey === null"
>
> But it seems a starkyl retrograde step to have write "!(hkey is null)"
instead of "hkey !== null"
>
>     "hkey !== null"
>
> is (much!) better than
>
>     "!(hkey is null)"
>
> So, if "!(hkey is null)" is not to people's tastes, as I suggest is the
case, then we might end up with an inconsistent
> use of "is" for null, and "!==" for not null. That is not good.
>
> I suggest that, either:
>
> (i) we have the keyword modifier "not", as in "hkey is not null", or have
an isnot keyword, as in "hkey isnot null", or
>
> (ii) forget about is for testing null-ness.
>
> Thoughts?
>
>
>
>


July 23, 2004
Kris wrote:

> if (x AINT null)

Hey! I already made that suggestion!

> (forgive me if I attributed that beauty to the wrong person)

You are forgiven. ;)

Just to confuse the parser even more, my suggested ain't keyword has an apostrophe in it.

James McComb
July 23, 2004
Kris wrote:

> Know wot' u mean guv', but "is not" seems a tad verbose, whereas:
> 
> if (x not null)
> 
> sounds fine to me (D "is not" COBOL :~)
> 
> However, I think the best suggestion was put forward by Ben:
> 
> if (x AINT null)
> 
> <g>
> 
> (forgive me if I attributed that beauty to the wrong person)

I don't think that was me... but I like it, too ;-)


> 
> "Matthew" <admin.hat@stlsoft.dot.org> wrote in message news:cdppih$1ab1$1@digitaldaemon.com...
>> While I like the use of is - for one thing, I can reorder the expression
> to read more naturally, i.e. "hkey is null"
>> rather than "null === hkey" - I don't like the need to ! the expression.
>>
>> Presumably the reason for preferring "is" over "===" is that it reads
> better, which it does in the === case.
>>
>>     "hkey is null"
>>
>> is better than
>>
>>     "hkey === null"
>>
>> But it seems a starkyl retrograde step to have write "!(hkey is null)"
> instead of "hkey !== null"
>>
>>     "hkey !== null"
>>
>> is (much!) better than
>>
>>     "!(hkey is null)"
>>
>> So, if "!(hkey is null)" is not to people's tastes, as I suggest is the
> case, then we might end up with an inconsistent
>> use of "is" for null, and "!==" for not null. That is not good.
>>
>> I suggest that, either:
>>
>> (i) we have the keyword modifier "not", as in "hkey is not null", or have
> an isnot keyword, as in "hkey isnot null", or

isnot, yousnot, we all snot for isnot

>>
>> (ii) forget about is for testing null-ness.
>>
>> Thoughts?
>>
>>
>>
>>

July 23, 2004
Matthew wrote:

> (i) we have the keyword modifier "not", as in "hkey is not null", or have an isnot keyword, as in "hkey isnot null", or

+1 for the isnot keyword as a direct replacement for !==.

Please don't introduce a separate not keyword, because newbies will be confused about when they should and shouldn't use it. For example, which of the following should be legal:

a. if (a is not null)
b. if (a not is null)
c. if not (a is null) etc.

isnot has less potential for confusion.

James McComb
July 23, 2004
James McComb wrote:
> Matthew wrote:
> 
>> (i) we have the keyword modifier "not", as in "hkey is not null", or have an isnot keyword, as in "hkey isnot null", or
> 
> 
> +1 for the isnot keyword as a direct replacement for !==.
> 
> Please don't introduce a separate not keyword, because newbies will be confused about when they should and shouldn't use it. For example, which of the following should be legal:
> 
> a. if (a is not null)
> b. if (a not is null)
> c. if not (a is null) etc.
> 
> isnot has less potential for confusion.

I highly doubt this would be an issue.  Almost everybody is going to do the most obvious that comes to mind: write it out like plain old English.

Unless like Yoda they talk, correct will they be!

 -- andy
July 23, 2004
"James McComb" <alan@jamesmccomb.id.au> wrote in message news:cdptfp$1but$1@digitaldaemon.com...
> Matthew wrote:
>
> > (i) we have the keyword modifier "not", as in "hkey is not null", or have an isnot keyword, as in "hkey isnot null",
or
>
> +1 for the isnot keyword as a direct replacement for !==.
>
> Please don't introduce a separate not keyword, because newbies will be confused about when they should and shouldn't use it. For example, which of the following should be legal:
>
> a. if (a is not null)

Only this one. If not is a separate word, and is a keyword modifier, it'd only be in concert with is.

For me, though, I would rather it be isnot, as this cuts down on the parsing hassles

> b. if (a not is null)
> c. if not (a is null) etc.
>
> isnot has less potential for confusion.
>
> James McComb


« First   ‹ Prev
1 2 3 4 5