Super-dee-duper D features

Sean Kelly sean at f4.ca
Wed Feb 14 09:14:27 PST 2007


janderson wrote:
> Nicolai Waniek wrote:
>> I waited a long time to reply to this thread and I didn't read the
>> latest (let's guess, 60) messages replied to this thread because lots of
>> them where about LISP and of about how people think (recursively or not).
>>
>> So why do I reply then? Because all this discussion about mixins and all
>> this stuff makes me a bit sad. I don't like it as well as I don't like
>> the C++ macros (and everyone on the #d channel knows that I really
>> _hate_ them...).
>>
>> The main problem I have with mixins/templates and so on is that it
>> enables a programmer to change the "look and feel" of the language
>> completely. What is bad about it? That if you're working in a team
>> someone has a "great idea" and invents his own MyDSL. So what? Everyone
>> else has to "learn" this new DSL. So they spend time on something they
>> would've better spent on coding something else, or fixing bugs... I
>> worked in a team of about 8 persons bugfixing a project with
>> approximately 1.000.000 LoC. The former programmers just seemed to not
>> know how to code (and we programmed using Delphi!!! a language most
>> people like to tell you: "oh, that's a language that shows you how to
>> work structured" - that's totally bullshit!).
>> So on one hand, we had to improve the software as it was used by just
>> too many companies to completely rewrite it - on the other hand we had
>> to bugfix it with a syntax that even didn't look like Pascal. Now what?
>> If we had someone "just for the sake of it" implementing something with
>> his MyDSL, i would've probably killed him!
>>
>> The thing I really want to say is: Stick to a clear definition on what
>> the language is, and what not. As long as I can remember - for example -
>> working on a python project was as easy as possible, because the
>> language just defined what is "and what not". If you let the programmer
>> decide and how to extend the language (and this is definitely possible
>> with templates and mixins and macros and the whole bunch of shitload).
>>
>> Okay, there are some examples (even provided by Walter) on how to
>> properly use mixins and templates (for example letting the compiler
>> generate the byte-array for an icon file), but there's always someone
>> who thinks how "smart" he is and invents something that's just time
>> consuming to learn...
>>
>> I think, that even templates are used too much at the moment (have a
>> look at tango, that's full of this). Why? because it doesn't fit into
>> the OOP pragma - you would've used some interface declarations and then
>> invented some functions that work on the interfaces instead of writing a
>> template... But well, there are some cases where templates are just nice.
>>
>> I would really like to see more of the "details" implemented (runtime
>> type information, for example, or something like delphi's "type TClass =
>> class of TObject" to make it possible to create correct Object
>> Factories) instead of the new language features we got with the last few
>> releases.
>>
>> I had a look at D because it was C++ just without all this stuff I
>> didn't like, but with the new language features, C++'s bad stuff is
>> simply replaced by something else that will definitely be used in the
>> wrong way (have a look at the apache headers, for example.
>> macros&macros&macros&...)
>>
>> I really hope you will guide the D language into the right direction,
>> because I do like the language, but unfortunately, I don't like the
>> newest language features.
>>
>> Best regards,
>> Nicolai
> 
> What about using it for files that you are going to load at runtime 
> otherwise? XML ect...?

I don't personally see this as much of a benefit.  Most applications 
have long run times, and spending a fraction of a second loading files 
on application start simply isn't a big deal.  Certainly not enough of 
one to invent a new language feature for it.


Sean



More information about the Digitalmars-d mailing list