dst = src rather than src dst

Janice Caron caron at serenityfirefly.com
Thu Sep 6 01:15:11 PDT 2007


-----Original Message-----
From: digitalmars-d-bounces at puremagic.com 
[mailto:digitalmars-d-bounces at puremagic.com] On Behalf Of Alexander Panek
Sent: 06 September 2007 08:13
To: digitalmars-d at puremagic.com
Subject: Re: dst = src rather than src dst

> I'm all against the equal sign, because it's used in completely different 
> terms.
> Assigning one type to the other just doesn't look right.

And yet, the following is already perfectly good D syntax

 import x = std.stdio;
 import x = std.string;

(allowing x.symbol to resolve as either std.stdio.symbol or std.string.symbol)


The following is also perfectly valid D:

 class Foo(alias A=B)
 {
 }

Anyone see an assignment going on here? I don't. It should also be noted that

 class Foo(alias B A)
 {
 }

is *not* valid D. Consistency anyone?


Arguments that the equals sign should only be used for assignment and nothing 
else are already broken.

Besides, like Bill, my primary  concern is that I want the destination on the 
left. The exact syntax is secondary.




More information about the Digitalmars-d mailing list