2011-11-30

inferred typing

11.12: adda/types/inferred typing:
(reviewing evlan's type system draft)
[@] 11.10.31/news.adda/lang"evlan/
evlan.org describes many addx features
. the reason you want to infer types
is so that you can have an efficient run-time;
if you don't care about that, as when prototyping,
then oop can be checking everything at run-time,
and both the coding and the compile times can be very fast .
. perhaps another reason to infer types
is so that you can warn users when oop might not help?
-- see the obj'c text's explanation of
why you don't want to type everything weakly
(as a pointer to anything);
basically it's because obj'c offers
so much freedom with deferred linking
that the compiler can make only the most general
inference:
if you don't mention a constraint
then the compiler has to assume you need
an unconstrained type for the purpose of
linking to future objects of unknown type .
. prototype developers and even production coders
like oop especially because it lends itself well
to such typeless programming,
ie, specifically avoiding type constraints by
letting the objects themselves decide whether
they understand a certain command .
. when you get into binary operations though,
(ie, pairs of objects -- and pairing is where
the dancing gets interesting )
then typeless programming is not so useful,
so typing is the only way to do what I call oop
(the classic example of oop
is the polymorphic type"number,
a class of subtypes including integers and floats;
ie, integer and floats can be playing well together
only because they are declared as subtypes of
the same type supertype, Numbers ).
Support Wikipedia Support Wikipedia