On Sun, Dec 19, 2010 at 11:24 AM, Meikel Brandmeyer <m...@kotka.de> wrote:
> Hi,
>
> Am 19.12.2010 um 11:36 schrieb nicolas.o...@gmail.com:
>
>> There is no static typing in Clojure. So the notion of return type do
>> not really exists.
>
> Yes. The type system of eg. Haskell or OCaml is another layer of information, 
> which you don't have in Clojure. On the other, it's another bad conscience 
> you have to satisfy. This you don't have to do in Clojure, which can makes 
> things easier at times. There is always a trade-off.

I agree. Some program that makes perfect sense cannot be typed in a
ML-like type system.

But without extra-type information, it is difficult to dispatch on the
return type, as would be possible with type classes in Haskell, for
example.

However, if you have a specific DSL, as in the present case, you might
be able to write your own type inference at the macro level and
annotate term with their return type to dispatch, using Meikel's idea,
at runtime.

-- 
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