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

Racket ftw

Name: Anonymous 2014-11-09 11:18

Racket's compilation phases are much better than Common Lisp's "one big mess" approach. Global mutables visible at compile-time only? Importing modules for use in macros only? Separate compilation where the compile-time mutability in one module can never sip into another? Fuck yeah to all of that. They've got like unlimited number of phases, i.e. 0 is runtime, 1 is expansion time, 2 is the expansion time of macros used in phase 1, etc.

I made a typeclass system with Racket macros in a jiffy, and it's even better than in Haskell as it has first-class instances. You can inspect instances, modify them, choose which one to call, etc.

Fuck yeah Racket!

Name: Anonymous 2014-11-30 15:12

So I've started learning Typed Racket. And guess what? It's shit!

E.g. this doesn't typecheck

(struct pt ((x : Fixnum) (y : Fixnum)))

(: dist (-> pt pt Flonum))
(def (dist p1 p2)
(sqrt
(+ (* (- (pt-x p1) (pt-x p2))
(- (pt-x p1) (pt-x p2)))
(* (- (pt-y p1) (pt-y p2))
(- (pt-y p1) (pt-y p2))))))


Type Checker: type mismatch
expected: Flonum
given: Number

Holy fuck, flonums don't unify with numbers, how retarded is that? These retards couldn't overload sqrt. No wonder LITHP idiots hate static typing - they suck at it!

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