4 ms·
When I work in Clojure I'm not thinking in term of manipulating lines. I think in terms of expressions. I want to take this expression and parent it here or the
by RivieraKid 13y ago
When I work in Clojure I'm not thinking in term of manipulating lines. I think in terms of expressions. I want to take this expression and parent it here or there, I do that. I want to factor out a piece of logic I can select the block and move it out, etc.
Lips has just a really tiny (if any) advantage over other languages in this. I can move code around quite easily in Java. And I don't have to care about formatting (I use autoformatter). In Lisps, formatting code manually is needed and it's a bit of a PITA especially when changing the code.
This also facilitates the powerful macro system where I can trivially write code that templates code for me or create DSLs to express the particular problem domain I'm working on. The whole aversion to prefix notation is incredibly superficial.
Usefulness of macros is overrated. In my experience, the s-exp syntax is too high price for macros. I like Julia's approach to macros much more.
- tomp 13y ago+1 for Julia. No need for sexprs for useful macros.
- pjmlp 13y agoOr Dylan, sadly Apple killed the project back in the day.
- yogthos 13y agoThere is Open Dylan http://opendylan.org/ http://opendylan.org/ and it actually seems to be actively developed from the looks of it.
- sultezdukes 13y agoDylan was a very interesting language for its time, but way too verbose for modern day developers. I'd love to see a stream-lined Dylan-like language that targets the JVM or CLR.
- pjmlp 13y agoYou mean HTML designers? :)
- pjmlp 13y agoI am fully aware of it, but its development seems to have stalled, if you look around.
- cgag 13y agovim/emacs autoindent clojure just fine I love that s-exps are totally unambiguous and find them easy to read personally.
- yogthos 13y ago>Lips has just a really tiny (if any) advantage over other languages in this. I can move code around quite easily in Java. I don't find it to be the same at all in practice. Lisp has a huge advantage in this because the code is written by manipulating the AST. You see the tree and the branches of executions visually. So, I can say I want to move this node to that position, or extract this node into a separate function. I find it's like playing with lego. You just stick individual pieces of logic together to produces complex functionality. You simply can't do this in Java on any practical level in my experience. It also doesn't help that Java code is imperative so even if you selected a block of logic, it doesn't mean you can just move it elsewhere without any side effects. >Usefulness of macros is overrated. In my experience, the s-exp syntax is too high price for macros. I like Julia's approach to macros much more. I strongly disagree, I find macros are incredibly useful. Clearly most people agree as some sort of a macro system creeps up into pretty much every language. However, most languages don't allow you to apply the language to itself when templating code. So you end up with special crufty syntax that eventually becomes a whole separate language that you have to learn. I'm not sure what price you're talking about either. I actually prefer s-exps to ALGOL style syntax. With s-exps your code is very regular and it follows the principle of least astonishment much better than alternatives. There are no inherent downsides to the syntax, if anything it makes the interaction between pieces of code more visually apparent. It provides extra visual information about the structure of the code. I personally like that very much.