I’m very new to clojure, but not at all new to Lisp. I have not doubt that the clojure language is interesting and powerful and expressive and with it we can solve many problems quickly, easily, and readably.
Am I correct to understand that clojure does not offer a label/goto construct in the language? It seems that the JVM does indeed have a goto instruction which languages like clojure could potentially take advantage of. stackoverflow/goto Please correct me if I’m wrong, but this seems to present some problems.
Sometimes I like to implement algorithms from Knuth’s Art of Computer Programming. These algorithms are often highly goto-based (for better or worse). If I can make my code look like Knuth’s code, I can easily be sure that it is correct, and I don’t really need to understand it–I can just trust Knuth. However, if I have to “improve” Knuth’s code, then I need to really understand it, and I must be very careful not to introduce errors in translating it to today’s coding style.
I have several packages in Common Lisp which involve compiler time macros which analyse code (pattern matching, boolean algebra, type system calculations) and macro expand to code which is heavily goto based. I.e., the user doesn’t see the goto, but the macro uses goto to efficiently implement finite state machines and binary decision diagrams.
I’d love to hear anyone’s thoughts.