Am Sun, 28 Sep 2014 14:43:03 +
schrieb "Marc Schütz" :
> Yeah, it wasn't a good idea. Somehow it felt strange to throw all
> type safety out of the window, but on the other hand, bit-level
> comparison is the purpose of `is`, which isn't typesafe to begin
> with.
I have the same feeling. N
On Sunday, 28 September 2014 at 14:27:56 UTC, Marco Leise wrote:
Am Sun, 28 Sep 2014 10:44:47 +
schrieb "Marc Schütz" :
On Saturday, 27 September 2014 at 11:38:51 UTC, Marco Leise
wrote:
> A byte for byte comparison of both operands is performed.
> For reference types this is the refer
Am Sun, 28 Sep 2014 10:44:47 +
schrieb "Marc Schütz" :
> On Saturday, 27 September 2014 at 11:38:51 UTC, Marco Leise wrote:
> > A byte for byte comparison of both operands is performed.
> > For reference types this is the reference itself.
>
> Maybe allow this only for types that somehow
On Saturday, 27 September 2014 at 11:38:51 UTC, Marco Leise wrote:
I'm against overloading identity checking, too. Instead I
would propose to change its definition to make Proxy structs
work. The rules are currently:
For class objects, identity is defined as the object
references are for the
I'm against overloading identity checking, too. Instead I
would propose to change its definition to make Proxy structs
work. The rules are currently:
For class objects, identity is defined as the object
references are for the same object. Null class objects can
be compared with is.
For s
On 9/24/14 6:48 PM, Meta wrote:
The following code fails under DMD 2.065:
struct Test
{
bool opBinary(string op: "is", T: typeof(null))(T val)
{
return false;
}
bool opBinaryRight(string op: "is", T: typeof(null))(T val)
{
return false;
}
}
void
On Wed, 24 Sep 2014 22:48:35 +
Meta via Digitalmars-d wrote:
> Is this supposed to work, and if not, should an enhancement be
> made to allow it?
i don't think that ER is needed. `is` is non-overloadable by design.
making it overloadable will bring in the requrements for something like
`is_w
On Wednesday, 24 September 2014 at 23:08:26 UTC, Adam D. Ruppe
wrote:
On Wednesday, 24 September 2014 at 22:48:36 UTC, Meta wrote:
Is this supposed to work, and if not, should an enhancement be
made to allow it?
It is not supposed to work - the docs don't list is as
overridable (http://dlang.
On Wednesday, 24 September 2014 at 22:48:36 UTC, Meta wrote:
Is this supposed to work, and if not, should an enhancement be
made to allow it?
It is not supposed to work - the docs don't list is as
overridable (http://dlang.org/expression.html look for "Identity
expressions") - and I don't thi
The following code fails under DMD 2.065:
struct Test
{
bool opBinary(string op: "is", T: typeof(null))(T val)
{
return false;
}
bool opBinaryRight(string op: "is", T: typeof(null))(T val)
{
return false;
}
}
void main()
{
auto t = Test();
//Error
10 matches
Mail list logo