Few things

bearophile bearophileHUGS at lycos.com
Tue Aug 7 07:07:27 PDT 2007


Vladimir Panteleev>In both cases you can just "return null;", which will work in
most cases.<

My stuff is just made of templates, they work finding the types of inputs, and
null doesn't have the type of keys and values.


>You can't do this in D either ('=' does not give a boolean result). Check your
facts before posting ;)<

You are right, and I'm a newbie still of D. To make that work you have to use an
explicit cast(bool), so that bug is avoided.


Vladimir Panteleev>Have you considered using: foreach(key;aa.keys.sort)<

I was talking about ways to solve more complex situations, that is a key()
function that takes both key and value before creating an item that's the one to
be sorted according to, that's useful when you have to sort according to values or
according to both keys and values, etc.


Vladimir Panteleev>What newsreader software do you use?<

I don't use it.

Bye,
bearophile
(remove HUGS to email me)



More information about the Digitalmars-d mailing list