On Mon, 27 Oct 2014 02:04:42 +0100, martijn brekelmans <tijntj...@msn.com> wrote: > Hello everybody, > > > I'm fiddling around with clojure, and I'd like to use readable with clojure. > I've scanned the wiki and mailing list for any pointers on how to use > readable within a clojure project, but found nothing. > > Clojure uses leiningen as its project and dependency management. There's a > popular community repository for clojure libraries, but readable isn't on > there. Apart from leiningen and the community repo, I have no idea how to get > this working with clojure. > > So, I'm looking for any pointers on how to get readable working with my > clojure projects.
Thanks! I'd love to see readable notations in Clojure, but I have not tried to implement any of them in Clojure. If you're willing to dive into it, that'd be great. In some cases you could use the "unsweeten" as a preprocessor, at least as a starting point. However, I think changes would need to be to it for serious Clojure work. The basic Clojure syntax is here: http://clojure.org/reader In Clojure, "{" is already taken for maps, and "#{" for sets. That interferes with {...} for infix. An implementation of the readable notations would have to determine if it will use {...} for infix, or switch to something else like #[...]. Clojure supports dispatching via "#", so that might not be *too* bad. An implementation could support both, but I'm guessing that it'd be best to support a backwards-compatible notation. I'm guessing that implementing x[...] as a synonym for (x #[...]) would be okay, but that needs investigation. For *serious* work it should be possible to embed it as part of the reader. The Common Lisp implementation does this for all tiers, and SRFI-105 is now built into guile (at least). --- David A. Wheeler ------------------------------------------------------------------------------ _______________________________________________ Readable-discuss mailing list Readable-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/readable-discuss