*sigh*

Caligo iteronvexor at gmail.com
Tue Dec 27 13:06:54 PST 2011


On Tue, Dec 27, 2011 at 9:25 AM, Andrei Alexandrescu <
SeeWebsiteForEmail at erdani.org> wrote:

> The way I see it is, you are a customer (and one who has had enough
> faith to hang around for a while), so your issues should be given
> priority. We can and we should improve quality in the abstract, but at
> the end of the day it's about the human beings who are using the language.
>

I prefer to be called a "user" rather than a "customer".  Even better, a
"member" of _D_ revolution.
:-)

Let me make a couple of points about this code. (To be clear, neither
> justifies the presence of an internal compiler error.)
>
> First, you are returning a reference to a local. That is automatically
> suspicious, although I assume this is reduced code from something
> meaningful.
>
> Second, you are exploring a territory that is hardly accessible with other
> languages - operator overloading with consolidated implementation in
> conjunction with subtyping. That means it's not run-of-the-mill stuff the
> compiler is failing with, it's stuff that you would need to abandon
> wholesale if you switched languages.
>
> Again, that's not a justification for the code not working with a
> meaningless error message. I want to warn against the paradoxical "I can't
> get creative use of feature X working, therefore I'm going back to my old
> language where I can't even think of X."
>
> That _all_ being said, creative use of creative D features is a prime
> attraction factor of D and we must have them down perfectly. As I mentioned
> once, very often the first use of D by newcomers is not some shit task;
> shit tasks can be done in any language. It's some difficult task that D
> features promise a miraculous solution for, one that would be quite hard to
> achieve with other languages.
>
>
> Andrei
>

Actually, in regards to this issue, there isn't anything meaningful in my
code because:

somewhere in my project there is a member function that returns void,
represented in the code I posted by "fun()".  Then there is a another
member function that returns non-void, and its name differs only by a
letter (we'll call it here funs() ).  When I was coding I meant to call
funs(), and not fun().  When it came time to compiling the code, I got the
non-informative error message. This

b3 = (b1 - b2).funs();

made the error go away, but it wasn't easy to find.  This has been an
accidental bug discovery, :-)

I know bitching about issues isn't productive, but sometimes it gets
frustrating.  Programming in D is very exciting and fun, and
compiler/language bugs get in the way.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20111227/d08e46a0/attachment.html>


More information about the Digitalmars-d mailing list