In most cases interfaces will stll be slower when you use them in a
polymorphic manner.

If your using classes for more complex objects than you will use interfaces
more to hide parts from different consumers.

If prototyping or writing smaller single exe apps than you may as well just
use type classes.

If you have a large amounts of type /subtypes then an interface prevents
code explosion

If you care abour security / POLA you will prefer interfaces.

In the short term people will do what community they come from  ( eg Java /
C# will use more interfaces)  in the longer term it will probably be more
system/ lib developers using predominantly type classes  and  business apps
using interfaces / complex objects but consuming libs that are using type
classes .

I dont think its more confusing than using inheritance vs  templates /
generics vs interfaces sure there are clearly seperate roles but there is
overlap , the inheritance vs interfaces argument went on for a long time .

Speaking of confusion if you keep HasField, then i would have a seperate
HasMethod . Keeping it seperate makes it very clear when your using a
method vs a delegate field.

Should HasField be removed from the user and subsumed by interfaces ? That
would remove some confusion .

Ben
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to