>
> Nobody wants to store every regexp in a separate file.
>
That's because regexes are 'atomic' - you don't place Clojure expressions
in the middle of them. SQL or math are vastly different from that. As for
SQL, it *is* common practice to store them as isolatedly as possible.
I have not questioned the validity of notations other than Clojure's. What
I do consider mistaken though, is the concrete strategy of extending
Clojure's reader.
Some DSLs are based on a really handy notation that has been in use by
> computer scientists and/or mathematicians for decades or longer. Trying to
> shoe-horn these convenient notations into something that looks like Clojure
> is not always the right way to go.
>
In fact your proposal is closer to "shoehorning" than mine :) by separating
languages you can use arbitrary syntaxes for each, without risk of
interfering. For example, one can list named physics/math functions using
their "DSLs" (including funny Unicodes etc), and generate first-class
callable code from that (no strings!). Like:
*File - example.math:
*
add (x, y):
x + y
*Compile util.math to Clojure and that to bytecode, ahead-of-time or
on-the-fly.
*
*File - consumer.clj:
*
(require 'example)
(example/add 3 2)
Assuming the math/physics functions were substantial enough, I think
developing a tiny compiler like that would be worth the effort.
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.