www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - not operator operator..

reply S. Chancellor <dnewsgr mephit.kicks-ass.org> writes:
I really really hate the !in, !is syntax.   I think a lot of other 
people do too. I propose that the word not, become an operator on 
operators.  For example:

Foo not is null
Foo not in Bar

This not keyword will only function when it is part of these expressions:

EqualExpression
RelExpression
InExpression

As a consequence the following would be valid:

Foo not == Bar
Foo not <= Bar

-S.
Apr 03 2006
next sibling parent Wang Zhen <nehzgnaw gmail.com> writes:
S. Chancellor wrote:
 I really really hate the !in, !is syntax.   I think a lot of other 
 people do too. I propose that the word not, become an operator on 
 operators.  For example:
 
 Foo not is null
 Foo not in Bar
 
 This not keyword will only function when it is part of these expressions:
 
 EqualExpression
 RelExpression
 InExpression
 
 As a consequence the following would be valid:
 
 Foo not == Bar
 Foo not <= Bar
 
 -S.
 

I don't hate !is and !in, but if they were to change, I would suggest a more succinct syntax: !is => not !in => out
Apr 03 2006
prev sibling next sibling parent reply kris <foo bar.com> writes:
S. Chancellor wrote:
 I really really hate the !in, !is syntax.   I think a lot of other 
 people do too. I propose that the word not, become an operator on 
 operators.  For example:
 
 Foo not is null
 Foo not in Bar
 
 This not keyword will only function when it is part of these expressions:
 
 EqualExpression
 RelExpression
 InExpression
 
 As a consequence the following would be valid:
 
 Foo not == Bar
 Foo not <= Bar

D !is BASIC ;-)
Apr 03 2006
parent Charles <noone nowhere.com> writes:
 D !is BASIC

Hehe. I personally prefer the !is syntax . kris wrote:
 S. Chancellor wrote:
 
 I really really hate the !in, !is syntax.   I think a lot of other 
 people do too. I propose that the word not, become an operator on 
 operators.  For example:

 Foo not is null
 Foo not in Bar

 This not keyword will only function when it is part of these expressions:

 EqualExpression
 RelExpression
 InExpression

 As a consequence the following would be valid:

 Foo not == Bar
 Foo not <= Bar

D !is BASIC ;-)

Apr 04 2006
prev sibling next sibling parent reply "Regan Heath" <regan netwin.co.nz> writes:
On Mon, 3 Apr 2006 20:34:24 -0700, S. Chancellor  
<dnewsgr mephit.kicks-ass.org> wrote:
 I really really hate the !in, !is syntax.   I think a lot of other  
 people do too.

I like !in and !is.
 I propose that the word not, become an operator on operators.

I don't like it. - It's more typing. - "!" already means "not" to me (in this context). - I read "!is" as "not is" and can't see an advantage to having "is not" instead. (I don't see why it has to be correct english) Regan
Apr 03 2006
parent reply S. Chancellor <dnewsgr mephit.kicks-ass.org> writes:
On 2006-04-03 22:24:39 -0700, "Regan Heath" <regan netwin.co.nz> said:

 On Mon, 3 Apr 2006 20:34:24 -0700, S. Chancellor  
 <dnewsgr mephit.kicks-ass.org> wrote:
 I really really hate the !in, !is syntax.   I think a lot of other  
 people do too.

I like !in and !is.
 I propose that the word not, become an operator on operators.

I don't like it. - It's more typing. - "!" already means "not" to me (in this context). - I read "!is" as "not is" and can't see an advantage to having "is not" instead. (I don't see why it has to be correct english) Regan

!is is ugly and hard to read, code is supposed to be beautiful.
Apr 04 2006
parent reply "Regan Heath" <regan netwin.co.nz> writes:
On Tue, 4 Apr 2006 06:03:39 -0700, S. Chancellor  
<dnewsgr mephit.kicks-ass.org> wrote:
 On 2006-04-03 22:24:39 -0700, "Regan Heath" <regan netwin.co.nz> said:

 On Mon, 3 Apr 2006 20:34:24 -0700, S. Chancellor   
 <dnewsgr mephit.kicks-ass.org> wrote:
 I really really hate the !in, !is syntax.   I think a lot of other   
 people do too.

 I propose that the word not, become an operator on operators.

- It's more typing. - "!" already means "not" to me (in this context). - I read "!is" as "not is" and can't see an advantage to having "is not" instead. (I don't see why it has to be correct english) Regan

!is is ugly and hard to read

I disagree on both points.
 code is supposed to be beautiful.

code is not supposed to be english, it's supposed to be code. code _is_ beautiful, english is not. Regan
Apr 04 2006
next sibling parent "Derek Parnell" <derek psych.ward> writes:
On Wed, 05 Apr 2006 07:37:44 +1000, Regan Heath <regan netwin.co.nz> wrote:

 On Tue, 4 Apr 2006 06:03:39 -0700, S. Chancellor  
 <dnewsgr mephit.kicks-ass.org> wrote:

 !is is ugly and hard to read

I disagree on both points.

I disagree with Regan and agree with S.
 code is supposed to be beautiful.

code is not supposed to be english, it's supposed to be code. code _is_ beautiful, english is not.

While that may be true, code is also meant to be easy to read by humans. My opinion is that keywords that are a combination of letters and symbols are contrary to human reading expectations and thus these decrease legibility. To overcome this, people need time to become accustomed to them before reading code for them becomes easier. My guess is that most people who first come to read D code that contains "!is" will have a momentary pause, but after a few repetitions will see it as no more 'confusing' than seeing "e.g." in standard English text. -- Derek Parnell Melbourne, Australia
Apr 04 2006
prev sibling parent reply "John C" <johnch_atms hotmail.com> writes:
 code is supposed to be beautiful.

code is not supposed to be english, it's supposed to be code. code _is_ beautiful, english is not.

Clearly you've never read Yeats, Auden or Eliot. Frankly they make English more beautiful than any code I've seen.
Apr 04 2006
parent "Regan Heath" <regan netwin.co.nz> writes:
On Tue, 4 Apr 2006 23:13:29 +0100, John C <johnch_atms hotmail.com> wrote:
 code is supposed to be beautiful.

code is not supposed to be english, it's supposed to be code. code _is_ beautiful, english is not.

Clearly you've never read Yeats, Auden or Eliot. Frankly they make English more beautiful than any code I've seen.

In visual appearance or actual meaning? I think code and writing can be compared in similar terms, i.e. does it get it's point across, does it do so elegantly, etc. However the actualy thing you measure to detemine those factors is different in each case. i.e. in the case of code whitespace in the right places can make the point of the code clearer.. I think it has less impact on writing. I could be wrong. In either case I think OP was referring to visual appearance of the actual characters in combination. This is obviously affected by the font used (as I suggested in another post) and (as Derek mentions) what you're used to. Regan
Apr 04 2006
prev sibling next sibling parent reply "Jarrett Billingsley" <kb3ctd2 yahoo.com> writes:
"S. Chancellor" <dnewsgr mephit.kicks-ass.org> wrote in message 
news:e0spgo$2jvr$1 digitaldaemon.com...
 Foo not is null
 Foo not in Bar

Ew.
 Foo not == Bar
 Foo not <= Bar

How about Foo not equal to Bar Foo not less than or equal to Bar While you're at it? ;) Terseness is both a curse and a blessing of C-style syntax...
Apr 03 2006
next sibling parent reply Derek Parnell <derek psych.ward> writes:
On Tue, 4 Apr 2006 01:59:59 -0400, Jarrett Billingsley wrote:

 Terseness is both a curse and a blessing of C-style syntax...

A language that I use daily (Progress 4GL) not only has the standard operators defined in terms of symbol characters etc... is also has them defined as ... eq ne gt lt ge le so one can write code such as for each Customer where balance gt 1000 -- Derek (skype: derek.j.parnell) Melbourne, Australia "Down with mediocracy!" 4/04/2006 4:10:11 PM
Apr 03 2006
next sibling parent =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
Derek Parnell wrote:

 A language that I use daily (Progress 4GL) not only has the standard
 operators defined in terms of symbol characters etc... is also has them
 defined as ...
 
  eq
  ne
  gt
  lt
  ge
  le
 
 so one can write code such as 
 
    for each Customer where balance gt 1000

The same is also used in Perl and in PPC assembler. Probably lots of other places, as well. I like them. --anders
Apr 04 2006
prev sibling next sibling parent =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
Derek Parnell wrote:

 A language that I use daily (Progress 4GL) not only has the standard
 operators defined in terms of symbol characters etc... is also has them
 defined as ...
 
  eq
  ne

This could work for "is" and "not is" too, just that it would end up as being Python ? I don't mean "is not" here, but http://tinyurl.com/nsm5u ;-) --anders
Apr 04 2006
prev sibling parent Bruno Medeiros <brunodomedeirosATgmail SPAM.com> writes:
Derek Parnell wrote:
 On Tue, 4 Apr 2006 01:59:59 -0400, Jarrett Billingsley wrote:
 
 Terseness is both a curse and a blessing of C-style syntax...

A language that I use daily (Progress 4GL) not only has the standard operators defined in terms of symbol characters etc... is also has them defined as ... eq ne gt lt ge le so one can write code such as for each Customer where balance gt 1000

-- Bruno Medeiros - CS/E student http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D
Apr 04 2006
prev sibling parent reply S. Chancellor <dnewsgr mephit.kicks-ass.org> writes:
On 2006-04-03 22:59:59 -0700, "Jarrett Billingsley" <kb3ctd2 yahoo.com> said:

 "S. Chancellor" <dnewsgr mephit.kicks-ass.org> wrote in message 
 news:e0spgo$2jvr$1 digitaldaemon.com...
 Foo not is null
 Foo not in Bar

Ew.
 Foo not == Bar
 Foo not <= Bar

How about Foo not equal to Bar Foo not less than or equal to Bar While you're at it? ;) Terseness is both a curse and a blessing of C-style syntax...

I didn't say I wanted to program in AppleScript. :P I hate mixing symbols and words. This is terrible. I'd rather redefine all the equal set and comparison operators. The whole point of the is-operator is equivalence, unfortunately there's no triple bar symbol. -S.
Apr 04 2006
parent reply =?UTF-8?B?QW5kZXJzIEYgQmrDtnJrbHVuZA==?= <afb algonet.se> writes:
S. Chancellor wrote:

 I didn't say I wanted to program in AppleScript. :P  I hate mixing 
 symbols and words.  This is terrible.  I'd rather redefine all the equal 
 set and comparison operators.  The whole point of the is-operator is 
 equivalence, unfortunately there's no triple bar symbol.

Sure there is. ≡ in Unicode (\u2261), or === in plain ASCII. It's just that it was removed from the language in DMD 0.126 ? But I don't really see the point of bringing the old thread up ? It's even more futile than the whole "Boolean wars" thing was... If you don't like !is, then !do use it ? I don't think it'll change. It's just a kludge to fill a place for the "TOKnotidentity" token. *I* hate the ireal and creal types, but those are staying as well... Is it important enough to choose another language for ? Not to me. Then again I cheated, by just going back to the bad old C syntax. Just like you, I don't think I would have liked the "!is" either. --anders PS. My own suggestion was ~is, which works the same as ~this does. Was slightly more readable, but still a bit hard on the brain.
Apr 04 2006
parent reply Georg Wrede <georg.wrede nospam.org> writes:
Anders F Björklund wrote:
 S. Chancellor wrote:
 
 I didn't say I wanted to program in AppleScript. :P  I hate mixing
 symbols and words.  This is terrible.  I'd rather redefine all the
 equal set and comparison operators.  The whole point of the 
 is-operator is equivalence, unfortunately there's no triple bar
 symbol.

Sure there is. ≡ in Unicode (\u2261), or === in plain ASCII. It's just that it was removed from the language in DMD 0.126 ?

If D really _demands_ source code to be in UTF, then there is no excuse for avoiding single-character operators like "≡". Further, if a computer system is able to provide this UTF character set for source code writing, then one is _allowed_ to assume it can print them on the printer, too. Therefore, it is incongruous to avoid these characters as potential operators, while still demanding that D only be implemented on 32-bit systems. (We really can assume that from today on, any system purporting to be 32-bit, supports at least UTF.) --- One neat detail in the language definition would be that any "non US-ASCII" single or double character "operator" may actually be defined by the user, or in a custom library. Of course, any well-defined counter argumets are invited here.
Apr 04 2006
next sibling parent reply "Regan Heath" <regan netwin.co.nz> writes:
On Wed, 05 Apr 2006 01:23:03 +0300, Georg Wrede <georg.wrede nospam.org>  
wrote:
 Anders F Björklund wrote:
 S. Chancellor wrote:

 I didn't say I wanted to program in AppleScript. :P  I hate mixing
 symbols and words.  This is terrible.  I'd rather redefine all the
 equal set and comparison operators.  The whole point of the  
 is-operator is equivalence, unfortunately there's no triple bar
 symbol.

just that it was removed from the language in DMD 0.126 ?

If D really _demands_ source code to be in UTF, then there is no excuse for avoiding single-character operators like "≡".

Except that they're not easily acessable on a common/standard keyboard, right? Regan
Apr 04 2006
parent reply Derek Parnell <derek psych.ward> writes:
On Wed, 05 Apr 2006 10:31:04 +1200, Regan Heath wrote:

 On Wed, 05 Apr 2006 01:23:03 +0300, Georg Wrede <georg.wrede nospam.org>  
 wrote:
 Anders F Björklund wrote:
 S. Chancellor wrote:

 I didn't say I wanted to program in AppleScript. :P  I hate mixing
 symbols and words.  This is terrible.  I'd rather redefine all the
 equal set and comparison operators.  The whole point of the  
 is-operator is equivalence, unfortunately there's no triple bar
 symbol.

just that it was removed from the language in DMD 0.126 ?

If D really _demands_ source code to be in UTF, then there is no excuse for avoiding single-character operators like "≡".

Except that they're not easily acessable on a common/standard keyboard, right?

What? You mean you're *not* using the standard 473-key keyboard? How strange !? -- Derek (skype: derek.j.parnell) Melbourne, Australia "Down with mediocracy!" 5/04/2006 9:54:22 AM
Apr 04 2006
parent reply Georg Wrede <georg.wrede nospam.org> writes:
Derek Parnell wrote:
 Regan Heath wrote:
 Georg Wrede
 Anders F Björklund wrote:
 S. Chancellor wrote:
 
 I didn't say I wanted to program in AppleScript. :P  I hate
 mixing symbols and words.  This is terrible.  I'd rather
 redefine all the equal set and comparison operators.  The
 whole point of the is-operator is equivalence, unfortunately
 there's no triple bar symbol.

Sure there is. ≡ in Unicode (\u2261), or === in plain ASCII. It's just that it was removed from the language in DMD 0.126 ?

If D really _demands_ source code to be in UTF, then there is no excuse for avoiding single-character operators like "≡".

Except that they're not easily acessable on a common/standard keyboard, right?

What? You mean you're *not* using the standard 473-key keyboard? How strange !?

If somebody is able to produce "≡", then let him define it. All we need is some suitable syntax. define ≡ opMyEqual; // or something like this I admit, this idea is not yet implementable as such: some operators may not be strictly binary, and other such issues. And I'm definitely not talking D 1.0 here. But still. Such a character would of course only be used in that particular application, and thus probably be developed by a group of people who can tell each other how to produce this character. Or they can copy/paste it (just as I did, without even bothering to search for ways of actually typing it). However, many very illustrative UTF characters do exist. Math, statistics, programming, logic, etc... could benefit from their use in source code. And if they were user-defined-only (as opposed to ever becoming included in the actual D spec), issues of right or wrong usage should be on a par with issues around variable names. (I.e. any idiot can use variable names written in Thai or Russian characters, but it's still not too common, and never will be.) --- I'm not really pursuing this issue as something First Priority, or Essential. It's more like, if we don't accept this, then what's the use of accepting any at all non-USASCII source code (outside of string literals)?
Apr 04 2006
next sibling parent Derek Parnell <derek psych.ward> writes:
On Wed, 05 Apr 2006 03:37:40 +0300, Georg Wrede wrote:

 Derek Parnell wrote:
 Regan Heath wrote:
 Georg Wrede



 If D really _demands_ source code to be in UTF, then there is no
 excuse for avoiding single-character operators like "".

Except that they're not easily acessable on a common/standard keyboard, right?

What? You mean you're *not* using the standard 473-key keyboard? How strange !?

If somebody is able to produce "", then let him define it. All we need is some suitable syntax.

I'm sorry Georg, I wasn't disapproving of your idea, I was just making a lame joke about needing a large keyboard to make such an idea easy-to-use. In fact, I like the idea of being able to define new operators, but then I love Forth too ;-) -- Derek (skype: derek.j.parnell) Melbourne, Australia "Down with mediocracy!" 5/04/2006 10:55:09 AM
Apr 04 2006
prev sibling parent reply =?UTF-8?B?QW5kZXJzIEYgQmrDtnJrbHVuZA==?= <afb algonet.se> writes:
Georg Wrede wrote:

 Sure there is. ≡ in Unicode (\u2261), or === in plain ASCII.
 It's just that it was removed from the language in DMD 0.126 ?

If D really _demands_ source code to be in UTF, then there is no excuse for avoiding single-character operators like "≡".

Except that they're not easily acessable on a common/standard keyboard, right?

What? You mean you're *not* using the standard 473-key keyboard? How strange !?

If somebody is able to produce "≡", then let him define it. All we need is some suitable syntax. define ≡ opMyEqual; // or something like this I admit, this idea is not yet implementable as such: some operators may not be strictly binary, and other such issues. And I'm definitely not talking D 1.0 here. But still.

An old feature request was that D should allow Unicode operators, as an *alternative* to the ASCII operators. But it didn't catch on ? http://www.prowiki.org/wiki4d/wiki.cgi?FeatureRequestList/UnicodeOperators (Somehow these things are always treated as replacements, not add-ons)
 Such a character would of course only be used in that particular 
 application, and thus probably be developed by a group of people who can 
 tell each other how to produce this character. Or they can copy/paste it 
 (just as I did, without even bothering to search for ways of actually 
 typing it).

I just selected it from the Unicode input helper: http://www.algonet.se/~afb/d/unicode-palette.png
 I'm not really pursuing this issue as something First Priority, or 
 Essential. It's more like, if we don't accept this, then what's the use 
 of accepting any at all non-USASCII source code (outside of string 
 literals)?

I believe that D in practice is an ASCII language. That's OK with me. --anders
Apr 05 2006
parent reply "Chris Miller" <chris dprogramming.com> writes:
On Wed, 05 Apr 2006 04:08:08 -0400, Anders F Björklund <afb algonet.se>  
wrote:

 An old feature request was that D should allow Unicode operators,
 as an *alternative* to the ASCII operators. But it didn't catch on ?

 http://www.prowiki.org/wiki4d/wiki.cgi?FeatureRequestList/UnicodeOperators
 (Somehow these things are always treated as replacements, not add-ons)

Not everyone supports unicode very well. What happens when I try looking at your source code and I see funny boxes or question marks.. it'd be fine in string literals, but if it's part of the program flow, I'd be lost.
Apr 05 2006
next sibling parent reply Deewiant <deewiant.doesnotlike.spam gmail.com> writes:
Chris Miller wrote:
 On Wed, 05 Apr 2006 04:08:08 -0400, Anders F Björklund <afb algonet.se>
 wrote:
 
 An old feature request was that D should allow Unicode operators,
 as an *alternative* to the ASCII operators. But it didn't catch on ?

 http://www.prowiki.org/wiki4d/wiki.cgi?FeatureRequestList/UnicodeOperators

 (Somehow these things are always treated as replacements, not add-ons)

Not everyone supports unicode very well. What happens when I try looking at your source code and I see funny boxes or question marks.. it'd be fine in string literals, but if it's part of the program flow, I'd be lost.

Isn't that point defeated by the fact that we have Unicode identifiers?
Apr 05 2006
parent reply Lars Ivar Igesund <larsivar igesund.net> writes:
Deewiant wrote:

 Chris Miller wrote:
 On Wed, 05 Apr 2006 04:08:08 -0400, Anders F Björklund <afb algonet.se>
 wrote:
 
 An old feature request was that D should allow Unicode operators,
 as an *alternative* to the ASCII operators. But it didn't catch on ?



 (Somehow these things are always treated as replacements, not add-ons)

Not everyone supports unicode very well. What happens when I try looking at your source code and I see funny boxes or question marks.. it'd be fine in string literals, but if it's part of the program flow, I'd be lost.

Isn't that point defeated by the fact that we have Unicode identifiers?

Not really, as you currently know that identifiers can be Unicode, but not the operators. I agree that Unicode identifiers can be difficult to read if some of the characters are missing in the font, but at least you'd still know which operations were performed on them.
Apr 05 2006
parent reply Deewiant <deewiant.doesnotlike.spam gmail.com> writes:
Lars Ivar Igesund wrote:
 Deewiant wrote:
 
 Chris Miller wrote:
 On Wed, 05 Apr 2006 04:08:08 -0400, Anders F Björklund <afb algonet.se>
 wrote:

 An old feature request was that D should allow Unicode operators,
 as an *alternative* to the ASCII operators. But it didn't catch on ?



 (Somehow these things are always treated as replacements, not add-ons)

at your source code and I see funny boxes or question marks.. it'd be fine in string literals, but if it's part of the program flow, I'd be lost.


Not really, as you currently know that identifiers can be Unicode, but not the operators. I agree that Unicode identifiers can be difficult to read if some of the characters are missing in the font, but at least you'd still know which operations were performed on them.

The problem is that, even now, in the worst case you can get something that looks like this: ??? += ???; for (?? = ???; ??? < ?; ?.???()) { ???.?.???(??, ???); if (??.?()) writefln(??? * (?-??)); } While this is, of course, quite unlikely, I doubt that changing the operators in the above to "?" decreases readability very much. <g>
Apr 05 2006
parent "Jarrett Billingsley" <kb3ctd2 yahoo.com> writes:
"Deewiant" <deewiant.doesnotlike.spam gmail.com> wrote in message 
news:e110jq$31dh$1 digitaldaemon.com...
 ??? += ???;
 for (?? = ???; ??? < ?; ?.???()) {
 ???.?.???(??, ???);
 if (??.?())
 writefln(??? * (?-??));
 }

Don't forget: ? = ???? ? ??? : 0; The ternary ?: would be impossible to spot ;)
Apr 05 2006
prev sibling parent =?UTF-8?B?QW5kZXJzIEYgQmrDtnJrbHVuZA==?= <afb algonet.se> writes:
Chris Miller wrote:

 An old feature request was that D should allow Unicode operators,
 as an *alternative* to the ASCII operators. But it didn't catch on ?

Not everyone supports unicode very well. What happens when I try looking at your source code and I see funny boxes or question marks.. it'd be fine in string literals, but if it's part of the program flow, I'd be lost.

I thought D only supported Unicode platforms ? (it only does for input/output, for instance) Anyway, where there is use there is abuse I guess... Maybe it's good that there's no Unicode operators. I for one (usually) keep my code ASCII and English. --anders
Apr 05 2006
prev sibling parent Lars Ivar Igesund <larsivar igesund.net> writes:
Georg Wrede wrote:

 Anders F Björklund wrote:
 S. Chancellor wrote:
 
 I didn't say I wanted to program in AppleScript. :P  I hate mixing
 symbols and words.  This is terrible.  I'd rather redefine all the
 equal set and comparison operators.  The whole point of the
 is-operator is equivalence, unfortunately there's no triple bar
 symbol.

Sure there is. ≡ in Unicode (\u2261), or === in plain ASCII. It's just that it was removed from the language in DMD 0.126 ?

If D really _demands_ source code to be in UTF, then there is no excuse for avoiding single-character operators like "≡".

I have an utf-enabled email-client but that character is not present in my standard font. I only see a nice rectangle :)
Apr 05 2006
prev sibling next sibling parent reply Norbert Nemec <Norbert Nemec-online.de> writes:
Sorry, I don't agree. != has been in C for ages and any C programmer
should therefore understand !in or !is.

Unlike in natural language text, source code does ! become more readable
when using words. It may slightly help the newbie, but it will get in
the way for everyday use.

The problem of Perl, for example, is not that it uses cryptic operators,
but that it uses too many, so that it takes a long time to know all of
them. the die-hard Perl users love that because it really improves
productivity, but any outsider is left in the rain.

For D, it is important to find the right measure which lies somewhere in
between Perl and Cobol:
http://www.csis.ul.ie/COBOL/Exercises/Exm-AcmeStockReorder/Prg-AcmeStockReorder.htm
Apr 03 2006
next sibling parent reply =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
Norbert Nemec wrote:

 Sorry, I don't agree. != has been in C for ages and any C programmer
 should therefore understand !in or !is.
 
 Unlike in natural language text, source code does ! become more readable
 when using words. It may slightly help the newbie, but it will get in
 the way for everyday use.

Ehrm, wasn't '===' changed to 'is' exactly because it was more readable? I know many people that prefer 'not' over '!', 'and' over '&&', etc etc. Originally I didn't see a problem of adding them as alternative syntax, but now I know that it would somehow mean the D originals have to go... So requiring '!is' is bad enough, without making it 'not is' - or worse. It isn't very beautiful, but then I don't think that was a design goal ? --anders
Apr 04 2006
parent reply Don Clugston <dac nospam.com.au> writes:
Anders F Bjrklund wrote:
 Norbert Nemec wrote:
 
 Sorry, I don't agree. != has been in C for ages and any C programmer
 should therefore understand !in or !is.

 Unlike in natural language text, source code does ! become more readable
 when using words. It may slightly help the newbie, but it will get in
 the way for everyday use.

Ehrm, wasn't '===' changed to 'is' exactly because it was more readable?

I thought it was because === was almost indistinguishable from == with some international fonts.
 I know many people that prefer 'not' over '!', 'and' over '&&', etc etc.
 
 Originally I didn't see a problem of adding them as alternative syntax, 
 but now I know that it would somehow mean the D originals have to go...
 
 So requiring '!is' is bad enough, without making it 'not is' - or worse.
 It isn't very beautiful, but then I don't think that was a design goal ?
 
 --anders

Apr 04 2006
parent reply =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
Don Clugston wrote:

 Ehrm, wasn't '===' changed to 'is' exactly because it was more readable?

I thought it was because === was almost indistinguishable from == with some international fonts.

Yes, I guess that would qualify as "unreadable" when using such a font. :-) --anders
Apr 04 2006
parent reply S. Chancellor <dnewsgr mephit.kicks-ass.org> writes:
On 2006-04-04 01:46:01 -0700, Anders F Bjrklund <afb algonet.se> said:

 Don Clugston wrote:
 
 Ehrm, wasn't '===' changed to 'is' exactly because it was more readable?

I thought it was because === was almost indistinguishable from == with some international fonts.

Yes, I guess that would qualify as "unreadable" when using such a font. :-) --anders

!is is pretty hard to read to me. I hate having the ! next to the i.
Apr 04 2006
parent "Jarrett Billingsley" <kb3ctd2 yahoo.com> writes:
"S. Chancellor" <dnewsgr mephit.kicks-ass.org> wrote in message 
news:e0trg6$11dp$4 digitaldaemon.com...
 !is is pretty hard to read to me.  I hate having the ! next to the i.

It's easy to read for me. And for most people, apparently, considering that there hasn't been a topic on the issue since !is was implemented.
Apr 04 2006
prev sibling parent reply S. Chancellor <dnewsgr mephit.kicks-ass.org> writes:
On 2006-04-03 23:29:54 -0700, Norbert Nemec <Norbert Nemec-online.de> said:

 Sorry, I don't agree. != has been in C for ages and any C programmer
 should therefore understand !in or !is.
 
 Unlike in natural language text, source code does ! become more readable
 when using words. It may slightly help the newbie, but it will get in
 the way for everyday use.
 
 The problem of Perl, for example, is not that it uses cryptic operators,
 but that it uses too many, so that it takes a long time to know all of
 them. the die-hard Perl users love that because it really improves
 productivity, but any outsider is left in the rain.
 
 For D, it is important to find the right measure which lies somewhere in
 between Perl and Cobol:
 http://www.csis.ul.ie/COBOL/Exercises/Exm-AcmeStockReorder/Prg-AcmeStockReorder.htm

The
 

bad solution to an artificial problem. Have word based operators, or don't. The reason 'is' was picked is it's used in other languages for equivalence. I don't see !is anywhere. If we're not going to stick with the standard solution why not go to some other symbol for equivalence. Hell, we could just write : Foo # Bar Foo Bar Not to mention that i's and !'s should never be next to each other: !i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i -S.
Apr 04 2006
parent reply "Regan Heath" <regan netwin.co.nz> writes:
On Tue, 4 Apr 2006 06:13:23 -0700, S. Chancellor  
<dnewsgr mephit.kicks-ass.org> wrote:
 Not to mention that i's and !'s should never be next to each other:

 !i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i

What font are you using, the above is perfectly clear to me, ! and i look very different in my font (which I assume is times new roman - cos I have no option to change it here in Opera - that a quick search found, anyway). Regan
Apr 04 2006
parent reply "Derek Parnell" <derek psych.ward> writes:
On Wed, 05 Apr 2006 07:40:32 +1000, Regan Heath <regan netwin.co.nz> wrote:



 I have no option to change it here in Opera - that a quick search found,  
 anyway).

Select the 'Tools' menu. Select 'Preferences...' Select the 'Advanced' tab. Click on 'Fonts' in the left-hand-side panel. Click on the Type 'Interface display e-mail'. Click on the 'Choose' button to bring up the font dialog. -- Derek Parnell Melbourne, Australia
Apr 04 2006
parent "Regan Heath" <regan netwin.co.nz> writes:
On Wed, 05 Apr 2006 08:01:57 +1000, Derek Parnell <derek psych.ward> wrote:
 On Wed, 05 Apr 2006 07:40:32 +1000, Regan Heath <regan netwin.co.nz>  
 wrote:



 I have no option to change it here in Opera - that a quick search  
 found, anyway).

Select the 'Tools' menu. Select 'Preferences...' Select the 'Advanced' tab. Click on 'Fonts' in the left-hand-side panel. Click on the Type 'Interface display e-mail'. Click on the 'Choose' button to bring up the font dialog.

Ta. It's "Courier New" then. Regan
Apr 04 2006
prev sibling next sibling parent reply =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
S. Chancellor wrote:

 I really really hate the !in, !is syntax.   I think a lot of other 
 people do too.

I do too. Hmm, does "!in" even exist ?
 I propose that the word not, become an operator on 
 operators.  For example:
 
 Foo not is null
 Foo not in Bar

But this just looks just as horrible ? Back in the day it was suggested that the Foo !== null syntax was changed into !(Foo is null), so I guess you can use that ? I just gave up and converted it to !Foo... Boolean be damned. --anders
Apr 04 2006
next sibling parent Kyle Furlong <kylefurlong gmail.com> writes:
Anders F Bjrklund wrote:
 S. Chancellor wrote:
 
 I really really hate the !in, !is syntax.   I think a lot of other 
 people do too.

I do too. Hmm, does "!in" even exist ?
 I propose that the word not, become an operator on operators.  For 
 example:

 Foo not is null
 Foo not in Bar

But this just looks just as horrible ? Back in the day it was suggested that the Foo !== null syntax was changed into !(Foo is null), so I guess you can use that ? I just gave up and converted it to !Foo... Boolean be damned. --anders

And that would be a resounding NO.
Apr 04 2006
prev sibling parent S. Chancellor <dnewsgr mephit.kicks-ass.org> writes:
On 2006-04-04 00:06:06 -0700, Anders F Bjrklund <afb algonet.se> said:

 S. Chancellor wrote:
 
 I really really hate the !in, !is syntax.   I think a lot of other 
 people do too.

I do too. Hmm, does "!in" even exist ?
 I propose that the word not, become an operator on operators.  For example:
 
 Foo not is null
 Foo not in Bar

But this just looks just as horrible ? Back in the day it was suggested that the Foo !== null syntax was changed into !(Foo is null), so I guess you can use that ? I just gave up and converted it to !Foo... Boolean be damned. --anders

I liked the other syntax better. But this isn't perl, there shouldn't aliased operators. IMO.
Apr 04 2006
prev sibling parent reply Mike Parker <aldacron71 yahoo.com> writes:
S. Chancellor wrote:
 I really really hate the !in, !is syntax.

I don't. I actually quite like it.
 I propose that the word not, become an operator on 
 operators. 

I sure hope it doesn't.
Apr 04 2006
parent reply Lars Ivar Igesund <larsivar igesund.net> writes:
Mike Parker wrote:

 S. Chancellor wrote:
 I really really hate the !in, !is syntax.

I don't. I actually quite like it.
 I propose that the word not, become an operator on
 operators.

I sure hope it doesn't.

I agree with Mike here. On both accounts.
Apr 04 2006
parent Georg Wrede <georg.wrede nospam.org> writes:
Lars Ivar Igesund wrote:
 Mike Parker wrote:
 
 
S. Chancellor wrote:

I really really hate the !in, !is syntax.

I don't. I actually quite like it.
I propose that the word not, become an operator on
operators.

I sure hope it doesn't.

I agree with Mike here. On both accounts.

So do I.
Apr 04 2006