Hi Luke,

Luke Graham wrote:

> Ive written a similar thing in C++, and for implied conversions I had a
> cost, so that the least-lossy path could be followed. Not sure if you
> want to do something like that too, I wasnt totally convinced it was
> the best way to do it. Counting nodes is the obvious alternative and
> takes no work from the user.
Although I am pretty sure that you were refering to data loss, I first
answer a similar question if you don't mind :).

== concerning performance loss:

Well, implied conversions for me is not a performance, but kind of
"convenience feature". There probably wouldn't be a definite way to
automatically find the fastest conversion-path. That's why I decided to
allow either explicit conversion 
 myobj.to( YourObj, slotname)
where the user nows what he does or forced implizit conversion
 myobj.to!( YourObj )
where the user wants the conversion to be done regardless of perfomance.

The second option easily allows prototyping and latter on you may gain your
performance back by including a direct conversion lib between MyObj and
YourObj or by writing some of your own.

== concerning data loss:

The least lossy path should always be the direct conversion and IMHO every
user using implicit conversion has to make sure that the result of the
conversion is what he expected. 

Ok, concider we have "magical" criterias to determine the least lossy
conversion path for him and he does an upgrade of some libs (and with that
maybe a new / other conversion path is chosen).

How can he then make sure that the data he relied on is still in the result?

Therefor if he explicitely chooses the conversion "Slot", he can be sure,
that later added slots won't affect the results.

On the other hand if used the "dangerous" to! mode for prototyping, in the
final overhaul he may simply define a direct conversion which itself refers
to a defined implicit conversion.

Anyway I concider implicit conversion to be a "nice to have" which might be
useful for conversions between simple or similar classes but you can't rely
on it when it comes to complexity. 

I would like to contact you, if I'm gonna implement the implicit conversion.
BTW did you use some interconnecting classes/objects for the implicit
conversion and how did you call them (several people pointed out, that the
name "Slot" is misleading, but I have no better name so far).

Regards,
benny