compile time class introspection?

janderson askme at me.com
Fri Jun 15 20:53:12 PDT 2007


Serg Kovrov wrote:
> janderson wrote:
>> I disagree, I think an orthogonal design like D is a good thing in 
>> many cases.  It means that you don't have to learn so many keywords 
>> and are more likely to determine the syntax yourself.  It also means 
>> code is generally easier to maintain due to generalization because you 
>> can often   reuse the code in more different ways then originally 
>> intended.
>>
>> I don't regard the solution given as a hack it seems pretty obvious to 
>> me.  Either way it would have to be documented.  If you don't like it, 
>> write a wrapper template.
>>
>> Also I don't think good orthogonality means the language has to get 
>> more complex.  I think its about making the common coding primitives 
>> easy to use however also making them powerful enough if the user wants 
>> to extend them to something that is less common.
>>
>> -Joel
> 
> I'm not sure I understand what you mean by "orthogonal design", and what 
> it has to do with code reuse? I was talking about language facilities, 
> something not available as user or library code.

Take the example of D's arrays.  They all work the same across the whole 
language.  One syntax applied across many different uses.  If you wish 
to change the type of the array, you don't have to change your interface 
to users, or search replace loads of code.  Furthermore, you don't have 
to write so many specialized templates.  That's what I mean by 
generalization resulting in more reusable code.

> 
> I just want to say I like idea of language features to be thoughtfully 
> designed, as opposite to accidentally discovered side-effects. I have to 
> say I don't really care about actual origin of a feature, but rather 
> what it feels like.
> 
> -- serg.

I think a good orthogonal language is thoughtfully designed and things 
aren't accidentally discovered, they are simply logically discovered. 
Its like lego, you can make a million things from it with good building 
blocks.

-Joel


More information about the Digitalmars-d-learn mailing list