Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Unityped vs multityped

Name: Anonymous 2014-02-09 14:16

Performance Warning: Matrix values are arrays, as exported by math/array. The same performance warning applies: operations are currently 25-50 times slower in untyped Racket than in Typed Racket, due to the overhead of checking higher-order contracts. We are working on it.
http://docs.racket-lang.org/math/matrices.html

Still not convinced that unityped languages suck ass?

Name: Anonymous 2014-02-15 8:28

>>21
Values in Haskell have types, because the compiler can infer them from values. For instance, if you write
data Foo = Foo Double
g = Foo 6.28

the compiler will infer the type of g as "Foo" because the value "Foo 6.28" has a certain, well-defined type. You are wrong.

You don't declare what type a value has
In a multi-typed language you can. For instance, in ML you can declare a value's type like that:
val hd : int list -> int =
fn (x :: xs) => x
| ([]) => 0

Here hd is a value of a type "int list -> int" and the compiler will be able to enforce that.

See: Common Lisp.
Common Lisp is, of course, multi-typed, unlike unityped Scheme or Racket shit.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List