On Sun, Jan 4, 2009 at 11:48 AM, Timothy Pratley
<timothyprat...@gmail.com> wrote:
>
> From a cursory examination of "literate programming" central tenants
> appear to be:
> (1) order by human logic
> (2) use descriptive macros
> (3) program is a web
>
> (1) Is not possible in Clojure because it resolves symbols as it reads
> them. However that is easy to work around with a trivial patch (see
> http://groups.google.com/group/clojure/web/auto-def.patch). auto-def
> as the name suggests just defs a symbol that it can't find. So this
> allows you to declare functions out of order - top down - and hope
> they get redefed before any evaluation occurs. If evaluation does
> occur the error still has a stack showing where and what the var is
> (which will be nil - similar to a null pointer exception in java).
> Here is an example that will only work with auto-def:
> http://groups.google.com/group/clojure/web/lit-wc.clj
>
> (2) lisp is great for this with hyphenation as standard. (3) yikes!
> need to contemplate this.
>
> What are the arguments against *auto-def*?

It's going off topic, but...

It makes you believe that symbols, like class members in Java, can be
defined in any order and that the existence of the correct symbols
will be properly checked at compile time. Yet this assumption would be
wrong, no?


-- 
Venlig hilsen / Kind regards,
Christian Vest Hansen.

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