[Ur] Recursive modules?

Fredrik Roos fredrik.roos at gmail.com
Thu Sep 16 08:35:57 EDT 2010


Hello

I've been experimenting with Ur for a while and I must say it's impressive
work. One serious drawback i have noticed though is the lack of recursive
modules. Given the way urls work in Ur, the module structure must correspond
to the link structure on the website. And since websites almost always have
a graph structure as opposed to a tree structure, Ur's hierarchal module
system becomes an issue.

The workaround for this is putting almost all url-addressable functions in
the toplevel module in a recursive function definition. And if you want to
reference these functions you either has to put that code in the toplevel
module, or pass down references to them.

This is putting serious restrictions on how i structure my code and i think
it would be really problematic implementing a larger website (>50K lines) in
Ur for this reason.

I realize implementing a full recursive module system might be non-trivial,
but maybe there is a simpler workaround? The problem only shows up in urls,
not with Ur functions in general.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.impredicative.com/pipermail/ur/attachments/20100916/664d054d/attachment.htm>


More information about the Ur mailing list