TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Introducing Clochure: a better Clojure

138 pointsby old_soundabout 12 years ago

33 comments

Wilyaabout 12 years ago
&#62; The [] keys are closer to the central row of your keyboard than the less comfortable ().<p>&#62; You don't need to hold the shift key to type [] therefore you can code faster.<p>That's true only for a standard US-qwerty keyboard layout. My [] are located at altGr + (). These guys clearly haven't though i18n through. And if there are such blatant omissions on their front page, who knows what's lurking in the code ?
评论 #5473521 未加载
评论 #5473431 未加载
评论 #5473382 未加载
评论 #5473412 未加载
评论 #5473254 未加载
SeoxySabout 12 years ago
I got really excited for a second, and then I realized it was April 1st.<p>Clojure is a language I absolutely love, but have abandoned for practical reasons. (Debugging Clojure is an absolute nightmare, and the tooling doesn't quite agree with me. The JVM is the biggest hurdle in making Clojure useful for me: it causes slow startups times, a bloated environment, and makes it hard to deploy in our production environment.)<p>So my immediate though when I read "a better Clojure" was: somebody wrote an LLVM front-end for Clojure and turned it into a fast language compiled to native code.
nswanbergabout 12 years ago
The post is meant to be a joke, and isn't a bad one as such things go, but its fun to note that square brackets and Lisp go back quite a ways, and were a feature of M-expression syntax. [1]<p>It is also interesting to note the reasons why Mathematica's syntax, which shares some similarities to Lisp, uses square brackets instead of parenthesis, specifically to avoid ambiguity when using parenthesis to denote grouping terms. [2]<p>[1]: <a href="http://en.wikipedia.org/wiki/M-expression" rel="nofollow">http://en.wikipedia.org/wiki/M-expression</a> [2]: <a href="http://reference.wolfram.com/mathematica/tutorial/GettingUsedToMathematica.html" rel="nofollow">http://reference.wolfram.com/mathematica/tutorial/GettingUse...</a>
thejsjunkyabout 12 years ago
I'll cop to it: this had me going for a couple hundred milliseconds.
评论 #5473342 未加载
评论 #5473393 未加载
评论 #5473823 未加载
TylerEabout 12 years ago
This actually makes a certain sense. Especially the whole "no need to use shift to type the single most common character in your code" thing.
评论 #5473415 未加载
评论 #5474139 未加载
评论 #5473315 未加载
评论 #5473234 未加载
overloadedabout 12 years ago
From the logo I was expecting Japanese brackets:<p><pre><code> 「「MyObject alloc」init」 </code></pre> For the vacillating, have the best of both worlds:<p><pre><code> 〔〔MyObject alloc〕init〕</code></pre>
评论 #5473763 未加载
therockheadabout 12 years ago
First of April is such a pain.
评论 #5473395 未加载
alberichabout 12 years ago
&#62; Easier to read, compare: (+ (expt 2 30) 2) with [+ [expt 2 30] 2].<p>Really? So now... in place of "lots of irritating superfluous parentheses" you get "lots of irritating superfluous square brackets"?<p>meh
评论 #5473351 未加载
pmelendezabout 12 years ago
Beware fellows... This is the best discussion to tell who is a skimmer and who is a reader in HN :)
SolarNetabout 12 years ago
I know it's a joke, but why are languages so damn stuck on syntax. Why can't it be a one line change for person A to have () and person B to have [] (and person C have &#60;&#62;, or {}), and then have tools which automatically translate between them.<p>The same goes for every other syntax problem out there. Python and choosing between tabs, spaces, and smart tabs. The C family and choosing between where the damn braces go. Different keyword symbols (to support different languages!). Different symbol naming styles. All at the whim of personal preference.<p>We have the technology and (computer) science (more the mathematics really) to build such systems, why don't we!?<p>/rant<p>P.S. This is actually what I am working on... When I'm not busy... which is never.
评论 #5474365 未加载
columboabout 12 years ago
It's a great start, but I think &#60;&#62; would have been more appropriate, you could call it clomuretext.
loumfabout 12 years ago
Of course, PG covered this in the Arc FAQ<p><i>Why not use some other delimiter than parentheses?</i><p><i>We tried various possibilities. Square and curly brackets lose because they are less directional than parens (left and right differ in fewer pixels); &#60; and &#62; lose because they don't wrap around enough to enclose expressions longer than tokens.</i><p><a href="http://www.paulgraham.com/arcfaq.html" rel="nofollow">http://www.paulgraham.com/arcfaq.html</a>
nollidgeabout 12 years ago
Everybody check the calendar.
评论 #5473683 未加载
tcdowneyabout 12 years ago
They totally had me with this.<p>"So on the eve of April 1st we sat down in a brainstorm session with a team of PLT experts."
mseepgoodabout 12 years ago
What a missed opportunity. Reverse polish notation doesn't need any parentheses and it works well for Forth. Why do all Lisps make the same mistake?
michaelwwwabout 12 years ago
I most comfortable programming in Morse code and this doesn't have anything that might tempt me to switch.
kailuowangabout 12 years ago
One thing to add is that [] is much closer to the right pinky finger, which immensely boost the typing speed comparing to (). Now that's what I call a true re-thinking in code productivity. If we go another step further we might consider using ; ;+ 1;- 3 2;; I am liking it already.
jonahssabout 12 years ago
Finally a language I can get behind. I was never able to get into closure, but couldn't put my finger on the reason why. If only more languages could redefine themselves to be more usable and admit they have been outdated for years.
smrtinsertabout 12 years ago
After using TCL for several years and actually liking it, I have to admit the brackets look better. Plus lately I'm all about anti-rsi and shift parens is getting to be a major hassle.
djhworldabout 12 years ago
This is one of the better pranks I've seen today, this bit especially made me chuckle<p>&#62; It compiles faster, since the compiler don't need to differentiate Java parentheses from Clojure ones.
dannowattsabout 12 years ago
even knowing it's April fools, I wanted to believe this. even with some of the crazy reasonings<p>so... maybe it will be a project that has legs, after the holiday has passed!
prezjordanabout 12 years ago
Had me going for a while. In all seriousness, you can type clojure with square brackets, no? IIRC in Racket they are transferable.
评论 #5473440 未加载
ruttigerabout 12 years ago
April Fool's ruins the internet for a day.
asperousabout 12 years ago
I honestly think if they replaced the parenthesis with indentation they might actually be onto something
middaycabout 12 years ago
there actually is a concrete language where this (from clochure ex.)<p><pre><code> (+ (power 2 30) 2) </code></pre> and this<p><pre><code> + power 2 30 2 </code></pre> both work and mean absolutely the same. so if parens are the problem ...
评论 #5473604 未加载
评论 #5473877 未加载
fictorialabout 12 years ago
I really just need to turn the computer off on April 1 every year. Argh!
rayinerabout 12 years ago
Check out clojure source in the git repository...
sergiotapiaabout 12 years ago
Well `[]` _is_ easier to type than `()`.
weejudabout 12 years ago
[] is harder for me to read than ()
评论 #5473270 未加载
desireco42about 12 years ago
OK you got me with this :)
jsgrahamusabout 12 years ago
April Fool's?
stefantalpalaruabout 12 years ago
The next logical step is replacing all the square brackets with accolades (same time next year).
finishingmoveabout 12 years ago
lmao