On Thu, Jul 15, 2010 at 10:55 AM, Nicolas Oury <nicolas.o...@gmail.com>wrote:

> It's a hard problem. Most type-systems forbid the kind of program people
> write in Clojure
>
> For example (if (keyword? x) ....using the fact that x is a keyword...
> would not be typable in many languages. (Or there would be hundreds of
> special cases)
>

Actually the previous example typechecks just fine with Typed Racket. Same
with something like

(apply + (filter number? '(1 foo "bar" 2)))

Exactly these kind of cases make Typed Rackets occurrence typing system
interesting ( www.ccs.neu.edu/*scheme*/pubs/popl08-thf.pdf for more
details). But I don't think it would be easy to make it work with Clojure,
given how polymorphic and dynamic the language is (IMHO Scheme is not too
far from ML when it comes to type systems).


-- 
tomppa

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to