February 05, 2004
> >
> >A better alternative of 'instanceof' is the word 'is'. Example
> >
> >If (a is B) {
> >}
> >
>
> Why not isa? If foo is a Bar, then why not have the operator called that?
>
> if (a isa B) {}

Actually, coming from an Knowledge Representation background, that is what people in Ontologies call this relationship.  A good source of standard names for this kind of thing is OWL, the upcoming standard for the semantic wen:

http://www.w3.org/TR/2003/PR-owl-features-20031215/


February 05, 2004
Matthias Becker wrote:
>>>- Templates: the templates part of the language seems to be
>>>the weakest, with few examples and an akward syntax.  And I
>>>am not talking about the Foo<int> vs Foo(int) issue.  I really don't
>>>care about that, and if it keeps the grammar simpler, much better.
>>>I am talking about writing a generic function for "max", which
>>>is the "hello world" of templates.  It requires way too much code,
>>>and before seeing some example in the newsgroup, I was
>>>even wondering if it was possible.
>>
>>I find them to be quite sufficient, and easier to work with than C++ templates, but I tend to use them to parameterize classes, not write higher-order functions and the like. (for which they're not so hot, as there is no type deduction)
> 
> 
> You have typeof, so you can do typededuction. But it's still ugly.
> 
> 

second on that,
without the type deduction templates aren't as powerful as with it

roel
February 05, 2004
I just wanted to say thanks for your comments and compliments.  It's nice to hear about (even more) people who are discovering D, linking it, and yet have ideas to contribute to its development.

Welcome!

1 2 3
Next ›   Last »