--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@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+u...@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+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
For example the following quicksort implementation
(defn qsort [[pivot & xs]]
(when pivot
(let [smaller #(< % pivot)]
(lazy-cat (qsort (filter smaller xs))
[pivot]
(qsort (remove smaller xs))))))
could be written as
(set! python-style-op-op true)
defn qsort [[pivot & xs]]
when pivot
let [smaller #(< % pivot)]
lazy-cat
qsort
filter smaller xs
[pivot]
qsort
remove smaller xs
What do you think?
What do you think?
Significant white space is the most horrifying development in programming languages in the last 20 years. Please kill this thread.
What do you think?I think, go right ahead and give it to them. Worst that could happen is you gain insights into language design. I'd be interested in your users' comments; what worked, what didn't. If you really believe in that idea, don't give it up before you learn something from it.
--
A simple workaround I've considered, but haven't gotten around to doing anything about in e.g. Emacs, is to simply tone down the parens visually in the editor. Hierarchy of color, size, contrast, etc. matters a lot in perception, and by making the parens slightly less obvious visually one's eye would be drawn to the actual functions more, "parsing" the parentheses only when several symbols exist on the same line. Similar to what colorizing parentheses does - the color tells you more, if you pay attention to it.
My point is to introduce a second-class syntax to attract orthodox
users. Definitely not migrating.
Do it because you can, and so you can decide for yourself what to think about it.
We had this talk with scheme. They called it I expressions. Here is the link http://srfi.schemers.org/srfi-49/srfi-49.html
Do it because you can, and so you can decide for yourself what to think about it.
`quote` is a feature, not a bug. Its not just for distinguishing between lists and function calls, its for deferring evaluation. Its also been part of Lisp since the beginning... IIRC, its in McCarthy's paper that defined the first lisp.
The syntax does complect in one case.When you really do want a list as opposed to a function call. hence quote and (list ...)
I would also assert that Python complects formatting and semantic meaning of the code.
>>A simple workaround I've considered, but haven't gotten around to doing anything about in e.g. Emacs, is to simply tone down the parens visually in the editor.
Just last week i was astouned how readable clojure is, when its proper indented and the parenteses are invisible. This insight came upon me by pure accident ... i embedded some clojure-code in my blog via github/gist and used a pygments.css that made clojure-parenteses visually disappear. it was really amazing ... the code looked very similar to phyton and was more human-readable ... just a note - no vote.
Unless the function is threaded (->), the function call is always in the car position in a list, the args are the cdr elements.
I like the parentheses better. My only complaint is that I have to press the shift key to type them.
I like the parentheses better. My only complaint is that I have to press the shift key to type them.
You can always remap your keyboard / keyboard bindings. For example in emacs:(define-key clojure-mode-map "9" 'paredit-open-round)
ITT: emacs users complaining about modifier keys.
Sorry, but as a Vim guy, I couldn't help laughing.
--
programmer dvorak is better :)
--