On 16 Mar, 23:47, Elena <egarr...@gmail.com> wrote:
> On 16 Mar, 23:26, Timothy Pratley <timothyprat...@gmail.com> wrote:

> > what should happen
> > with this code:
>
> > (defn myfun []
> >   (another-fun 5))
> > (myfun)
> > (defn another-fun [x]
> >   (inc x))
>
> > In a compiled language that would be valid, but in a dynamic language
> > it is a runtime error. I don't see how to overcome this, which makes
> > auto-def quite useless :)
>
> I think this should be a runtime error. What we are discussing here is
> in:
>
> (defn myfun []
>    (another-fun 5))
>
> (defn another-fun [x]
>    (inc x))
>
> "myfun" definition is rejected, even if "another-fun" is just few
> lines away.

Furthermore, if I understand Rich's opinion in that regards, this
code:

(defn myfun []
    (another-fun 5))

should be rejected if definition of "another-fun" is missing (but I'd
say: only in code to be released).

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