Operator overloading

Ary Borenszweig ary at esperanto.org.ar
Tue Dec 23 15:25:03 PST 2008


Ary Borenszweig escribió:
> dennis luehring escribió:
>>> ...
>>> This translation is quite awful and unreadable. It would be so much 
>>> better to get:
>>>
>>> Query query = Select(a).Where(id == 5);
>>
>> what speaks against an sql parsing mixin?
>>
>> would be more expressive, compiletime based and typesafe
>> and even far more be able than what you can do with operator overloading
> 
> Autocompletion and syntax coloring.

And also, you get a nice compile error message if the query is 
malformed. With a mixin you might end up with a stack of 
hard-to-interpret error messages.

Finally, parsing strings is not easy, specially at compile time. And 
there's also the problem of lack of garbage collection at compile time...



More information about the Digitalmars-d mailing list