Hi Nathan! I am very intrigued by your approach. I would love to contribute, my problem is that I don't know the first thing about type inference systems (as in how they work on the inside). Do you have a good reference here? I'll take a look at what you've done, maybe bother you with some questions .... Thanks for the work!
cheers Paul On Fri, Sep 23, 2011 at 04:47, Nathan Sorenson <n...@sfu.ca> wrote: > Yes I am very hopeful progress is made on that front! I've been having > great success with 'Constraint Handling Rules' (CHR), which serves as > my basis for solving type constraints. > https://github.com/nsorenson/Clojure-CHR > contains my very preliminary crack at implementing this system. > > The trick with dynamic languages such as Clojure is that the functions > are extremely lax in what they accept--without a fairly advanced > inference system, you will simply infer every variable to be type > Object. I've been using CHR disjunctive branches to offer what's > called "occurrence typing"--a system where you may assign different > types to variables depending on the structure of the code. For > instance, if you have a (map? x) as a predicate on an if clause, you > know in the 'then' branch that x can be typed to Map. > > Nothing to show yet, and I'm not sure how well it will work on large > programs, but my first few little experiments are looking promising. > > On Sep 22, 3:28 am, Javier Neira Sanchez <atreyu....@gmail.com> wrote: > > i am surprised nobody mentioned gradual/optional typing< > http://lambda-the-ultimate.org/node/1707>, > > typed racket <http://docs.racket-lang.org/ts-guide/> and the possible > type > > checker to be built by *some clever hacker* on core.logic< > https://github.com/clojure/core.logic>some day. > > -- > 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 > -- 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