On Saturday, April 5, 2014 5:51:10 PM UTC-7, Jason Felice wrote: > > In the original post: > > > I had been writing elegant but deeply nested Clojure code that was very > difficult to read ... > > I focus on expressivity, specifically because of the write-only > phenomenom. This isn't peculiar to clojure; this happened a lot in the > Perl days (so much so, that that's where I remember "write-only code" being > coined). I've seen it with Scheme, Lua, and JavaScript as well. Some > people see it as a flaw of the language, but it's actually the flexibility > of the language that allows it. >
Very true. I often compare Clojure to Perl when it comes up in conversation. It may not be a flaw of the language itself, but I think I can say it's a flaw of most of the code the community has written in the language. I try not to make complaints without looking for a hint of a solution to present as well, and so I'm thinking about the syntax. > > And that's why many people have said things like this: "Write your code > _first_ for people to read. You needn't worry about the compiler, it will > have much less trouble understanding it than the people if it's correct." > (That's my phrasing.) > Good advice rarely taken. > > So, I wouldn't call code "elegant" if _you_ have trouble reading it when > you come back to it. The algorithm could be elegant, but not the code. > This is just how I use the word, though... I don't get to define it. > There is beautiful code, and there are elegant solutions. I use the word differently, but I get your meaning. > > > Though it's possible to write flatter more linear, more readable, more > maintainable code, I didn't really want to, and ... > > What you wrote sounds to me very much like, "I had some pain, and I > learned that what I did caused the pain, and I figured out how to fix the > pain... but I'd rather not" That *apparent* contradiction suggests to me > that you skipped the important part about what you really like about that, > and I'm very curious... Why didn't you want to write the easier-to-read > code? > There's the meat. I feel like the syntax of nested parens leads me and others to think in terms of nested function calls. The fastest way to get Clojure from the brain to the file leaves "write only" code, and we're all impatient. Certainly I take time to beautify and document sometimes, but that will always be secondary to getting it to run. I appreciate your thoughts Jason. > -- 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 --- 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 clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.