There you go - I fixed Java for you. Just look at that pretty python-esque syntax. But look closer... closer... Wow! It's just a healthy dose of my patented syntactic artificial sweetener!
The problem with JavaScript and it's subordinates (C, C#, Java, Lisp etc) is the cruft: parenthesiseses, semi-colons, and curly brackets - getting in the way of your beautiful statements.
Sure, you could take some extreme methods to eradicate the problem: like using CoffeeScript or learning Ruby or Python - but we all know those projects will be dead in a few years time, and you'll end up with a bunch of source code you can't run anymore...
So what's the answer?
It's no use blaming the brackets: they're here to stay, so we may as well not fight them. But if they have to be here - why not make them really, really, really, really hard to see?!
As pictured above, I've modified the Eclipse Java colour coding for "brackets" from neon-white (the apparent obvious default colour for language cruft) to a lovely dark-black. Not so dark that I can't see 'em if I want to, but dark enough to not see 'em when I don't. Et voila! Problem solved.
Unfortunately, "semi-colons" come under the same heading as "keywords": so they can't be visually eradicated. Hopefully as the trend of syntactic artificial sweetener sweeps the globe, IDEs and TextEditors will help us out - and we'll be superficially free of ugly languages forever!
(P.S. please let me know if you figure out how to do this in Textmate, or if I forgot to insult any programming languages)
(P.P.S I mean languages of some importance... not like, Haskell, or Perl)
UPDATE: To change syntax highlighting in Textmate, first go to Bundles->bundle editor->Edit Languages, then ya language, then the name of the regex that matches braces - for JavaScript it's meta.brace.curly.js
then open Preferences->Fonts and Colors and add a rule with the scope selector meta.brace.curly
and set your colours.
2 Comments
I do the same! http://www.natpryce.com/articles/000188.html
I just found your article. I was wondering if you knew the scope selector for braces in Java on Textmate. I couldn’t find something similar to meta.brace.curly for java. Any suggestions/help?