On Sat, 07 Feb 2009 00:39:33 +0100, Rainer Deyke rain...@eldwood.com wrote:
(Of course '!=' (as the opposite of '==' as opposed to '=') is already a
special case, so perhaps defining the '!op' operators individually is
unavoidable. 'a !== b' as '!(a == b)' would work, but 'a != b' as '!(a
=
Rainer Deyke wrote:
Daniel Keep wrote:
Rainer Deyke wrote:
This is, in my opinion, a significant design error in the language. The
difference between '!(a b)' and 'a ! b' is not obvious. There is
nothing about the operator '' that suggests that it should set a global
exception state, and
Bill Baxter wrote:
On Sat, Feb 7, 2009 at 8:54 AM, bearophile bearophileh...@lycos.com wrote:
Rainer Deyke:
It's a question of consistent patterns versus special cases.
You may think that for humans it's better to have a very orthogonal
language, like for example Scheme.
There's also a
On Fri, 06 Feb 2009 12:42:30 +0100, downs wrote:
This has been brought up before as an argument against the !in operator
(forcing us to resort to such workarounds as /notin/): that the !in
operator would have inconsistent syntax with in, because in returns a
pointer and !in would return a
downs wrote:
This is NOT a reason against !in. In fact, this so-called
inconsistency is already present in the language. If we remember,
!pointer already transforms it into a boolean, so it would actually
be more consistent if !in changed the return type to bool.
I agree. 'a != b' is short
Rainer Deyke wrote:
downs wrote:
This is NOT a reason against !in. In fact, this so-called
inconsistency is already present in the language. If we remember,
!pointer already transforms it into a boolean, so it would actually
be more consistent if !in changed the return type to bool.
I
downs wrote:
A large part of the case for !in is that you can pronounce it a *not
in* b. !+, on the other hand, would be .. what? a not plus b? does
that mean a - b? :)
It's a question of consistent patterns versus special cases. If
'a !op b == !(a op b)', then the parser can rewrite all 'a
Rainer Deyke:
It's a question of consistent patterns versus special cases.
You may think that for humans it's better to have a very orthogonal language,
like for example Scheme.
There's also a famous quote about this, Programming languages should be
designed not by piling feature on top of
On Sat, Feb 7, 2009 at 8:54 AM, bearophile bearophileh...@lycos.com wrote:
Rainer Deyke:
It's a question of consistent patterns versus special cases.
You may think that for humans it's better to have a very orthogonal language,
like for example Scheme.
There's also a famous quote about
Bill Baxter:
(a !in b) should exist and it should be the same as !(a in b).
Of course.
Bye,
bearophile
Bill Baxter wrote:
Note that D already has things like !. But quoth the spec:
For floating point comparison operators, (a !op b) is *NOT* the same
as !(a op b).
[emphasis added]
I had to check the spec for the difference. 'a ! b' and '!(a b)'
/are/ equivalent in the sense that '(a ! b)
Rainer Deyke wrote:
Bill Baxter wrote:
Note that D already has things like !. But quoth the spec:
For floating point comparison operators, (a !op b) is *NOT* the same
as !(a op b).
[emphasis added]
I had to check the spec for the difference. 'a ! b' and '!(a b)'
/are/ equivalent in
Daniel Keep wrote:
Rainer Deyke wrote:
Bill Baxter wrote:
Note that D already has things like !. But quoth the spec:
For floating point comparison operators, (a !op b) is *NOT* the same
as !(a op b).
[emphasis added]
I had to check the spec for the difference. 'a ! b' and '!(a b)'
/are/
Daniel Keep wrote:
Rainer Deyke wrote:
This is, in my opinion, a significant design error in the language. The
difference between '!(a b)' and 'a ! b' is not obvious. There is
nothing about the operator '' that suggests that it should set a global
exception state, and there is nothing
14 matches
Mail list logo