The Typed Racket Reference says:
> In most cases, use of ":" is preferred to use of "define:".
--
http://www.neilvandyke.org/
_________________________________________________
For list-related administrative tasks:
http://lists.racket-lang.org/listinfo/users
Two reasons:
1. Adding `:' before the definition allows you not to change the
existing untyped definition. This is good for diffs, for example.
2. I greatly prefer the visual appearance using `:' -- `define:'
results in lots of syntactic noise. Similarly, I prefer Haskell-style
type annotation to ML-style in those languages.
--
sam th
sa...@ccs.neu.edu
In my course I had a ton of definitions that were very formal but
still in comments:
;; foo : Number -> Number
and switching everything to TS was very easy with the `:' forms.
It goes the other way too -- it's much easier to move code back into
the untyped world by commenting out the `:' forms.
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://barzilay.org/ Maze is Life!