new-ed in a completely different context.
Object Inst ... Meth ...
Object
syntax of FbOB (and the blocks of Smalltalk and
the ..), via anonymous local classes which are immediately new-ed.
Foo$1Boo for
an inner class Boo inside Boo.
'a automatically; in Java, you must
declare them as <T>.
List<String>
<: List<Object> kinds of things (see here
for description)
String/Object may occur both positively and
negatively in List's signature, so it needs to be
invariant.
{ head : {} -> String } <: { head : {} -> Object }
would be a legal subtyping in our STFb rules
assuming String <: Object. But a full list type
would be at least like
{ add: String -> {}; head : {} -> String } <: { add: Object -> {}; head : {} -> Object }
and this relation fails because it also requires Object <:
String due to the add parameter. Java is
basically assuming that List will have
T both as argument and return type of methods and
so always forces invariance here. But, we know you can do
better than that.
<T extends C & I> void test(T t)
extends C & I" means T can be
any type which extends both class C and interface
I.
T <: C and T <:
I in our subtyping terminology.
T need not be any type,
but from a restricted range of types which gives added flexibility later.
test : 'a -> void \ { 'a <: C, 'a <: I }
? - this is
a form of existential type -- the typing holds for
some ?.
super(); in front of the
constructor if another constructor is not invoked at the start; this is a bit of a
hack.
super(); if none is declared.
final.
let-defined variable.