> It's also possible to write Typed Racket programs "types first", like > one would in Haskell, and I sometimes do. The "sums-of-products" > programming style of Haskell and ML can be expressed easily with Typed > Racket's structs and union types. You can also mix and match between > "Haskell" and "Racket" styles of programming, and it will all work.
Are you talking about this? We have already seen the : type annotation form. This is useful for definitions, at both the top level of a module (: x Number) (define x 7) and in an internal definition (let () (: x Number) (define x 7) (add1 x)) http://docs.racket-lang.org/ts-guide/more.html#(part._.Annotating_.Definitions) > You can even take this "mix and match" approach even further, and mix > typed and untyped code. Typed Racket modules can interact with untyped > Racket modules and contract checks at the boundary will prevent untyped > code from breaking the typed code. This is very handy, and is probably > the Typed Racket feature I find myself missing the most when programming > in Haskell or ML. Very interesting. I'm going to write a library. I want it to be available for the largest number of people. Can other Lisp-like languages (e.g. Guile) use libraries written in Typed Racket? > Of course, Haskell also provides type system features that Typed Racket > does not, such as type classes or type-level programming. Is there a need for such features in Typed Racket? Is it possible to implement them? Is there a plan to implement them? ____________________ Racket Users list: http://lists.racket-lang.org/users