On 26 Aug 2009, at 07:06, Vagif Verdi wrote: > I fail to see how macros can be contrasted to static typeng. They are > orthogonal.
That is true in principle, but integrating Lisp-style macros and compulsory static typing (as opposed to optional type hints) into the same language does require some careful thought. I haven't seen such a combination yet, and... > Here's and example of statically typed language (liskell) > with lisp syntax and full blown lisp macros: > http://blog.clemens.endorphin.org/2009/01/liskell-standalone.html ...this site is down at the moment. One aspect to think about is the type of s-expressions. It needs to be defined as an algebraic data type with variants "s-expression", "symbol", "string", "number" and perhaps more. Typed s-expressions will certainly change the style of macros, and without having seen it done in practice I wouldn't dare predict if it becomes, simpler, more difficult, or just different. The other obvious aspect is the syntax of type definitions and type specifications, and the interaction of type infererence with macro expansion. I'd expect a lots of subtleties that need to worked out in detail. For example, what happens if a macro expands into code that requires type inference to be correctly interpreted, but in a particular situation the compiler doesn't have enough information to infer all the types? The resulting error message could be quite a challenge to understand. Konrad. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---