Why <: and not <=: ?

38 views
Skip to first unread message

Dave

unread,
Jul 2, 2011, 7:14:39 AM7/2/11
to scala-language
If I understand typeclass with an upper boundery well then:

A <: B

means

A is a subtype of B or B itself (so B is inclusive)

Wouldn't

A<=: B

be more intuitive (I think the mathematical notation is : ∇t ⊆ τ. t →
t where t is A and τ is B (hopefully the unicode characters are
encoded well otherwise there is some mojibake in this post))

Donna Malayeri

unread,
Jul 3, 2011, 8:22:22 PM7/3/11
to scala-l...@googlegroups.com
In mathematics, yes, but in type systems, the less-than-equal sign or <: are used interchangeably, with the latter being far more common. It is understood that <: is a reflexive, transitive preorder and would therefore be equivalent to a symbol with an equal sign.

Donna

Dave

unread,
Jul 4, 2011, 7:13:55 AM7/4/11
to scala-language
Thanks, Donna.
Reply all
Reply to author
Forward
0 new messages