Oh my so many warts. In haskell, ocaml but also F#.
> Specifically, method constraints were added, introduced by a deliberately baroque syntax:
let inline (+) (x: ^T) (y: ^U) : ^V = ((^T or ^U):
(static member op_Addition : ^T * ^U -> ^V) (x, y))
> This definition says that any use of + is implemented via inlining a call to an appropriately-typed op_Addition method, defined on the type ˆT or ^U, i.e. the type of either the left-hand or right-hand argument. The ˆT notation for type variables indicates statically resolved type parameters (SRTP), i.e. type parameters which are resolved to a nominal type at compile-time.Why ^ and not using the existing : for seperating types from values? :T * :U -> :V would have looked like types, not pascal ptrs.
Equally interesting are ocaml warts like let x2 = 1.0 +. 2.0 (+ not overloaded or defined for floats), or haskell's decision to torpedo the "class" keyword.
Or ocaml hijacking ::
let xs = 1 :: xs, with :: being cons, which was initially the lisp dot notation '(1 . xs)
In retrospect perl's syntax is sane compared to this.