> After correcting it, I get a new curious error:
> Unknown constant tag 44 in class file user$eval1976
>  [Thrown class java.lang.ClassFormatError]

There is a difference between using load (and related functions) to
parse data, and using read (and related functions).

If you use read to parse a file, it just parses the file and gives you
back data structures.

If you use load to parse a file, it reads the data as an expression,
it creates a class on the JVM containing a function, and then executes
that function, which does the work required to return your data
structures.

Normally the results are the same, but the latter is less efficient;
but for large amounts of data, the latter won't even work.

The problem is that there are certain hard-coded limits on the JVM as
to the size of a class file, the size of a function etc; so for
parsing large amounts of data, you shouldn't use load - else you'll
hit that limit and get a rather unfriendly error message when the JVM
tries to load the invalid class file that clojure just created.


So if you are wanting to read very large clojure datastructures, put
your data in a separate file to your code, and use read or read-string
to load it.

-- 
Dave

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