Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Brackets give your editor the information it needs to automatically infer scoping and to do smart reformatting. Without it you're entirely on your own.


And my editor (or any good editor I'd argue) can do the same thing with indentation just as easily.


What counts as "good"? By your definition it's one that can provide helps with indentation-based blocks. :-)

I can't depend on having a "good" editor. I have 2 work machines, 2 home machines, ssh to a VPS, ssh to a bunch of machines at work, etc. So as often as not I have to use vim to do quick edits of code. I also am generally forced to use Apple's Xcode for Obj-C applications, but use other editors for anything else. Working on my own toys vs. working at work, vs. being in school instead of a commercial entity with nice software licenses also means I can't depend on having the same text editor available, other than free ones.

I'd prefer to use a programming language that was easy to read and write in just about any text editor. The only requirement I can't easily escape is that the editor must support auto-indent. (So MS Notepad is out.)


> I'd prefer to use a programming language that was easy to read and write in just about any text editor.

Actually you can apply that argument for whitespace only languages, because they produce code that is more consistent. So because the code is more consistent it is also easier to read and write (as opposed to say, dealing with someone's eccentric formatting).

Vim or emacs (the one I use) is available for any modern OS out there. It is free and has outstanding syntax highlighting and works through a terminal as far as I know.

In general it seems like this is a tail wagging the dog problem -- picking a language to work with (what seems to be a broken) editor.


In general it seems like this is a tail wagging the dog problem

I agree but in reverse. You're willing to give up a trivially parseable syntax just to avoid typing a few braces?


No, not because of typing. Because of reading.


It can't because the indentation is part of the code. If I run a Java source file through a script that removes all whitespace I can get a beautifully formatted file back with a single keypress. This is literally impossible for whitespace languages like Python and Haskell.


But likewise, if I remove all braces from Java I can't necessarily get them back with a single keypress.


But unlike whitespace braces aren't removed or scrambled by routine text manipulation.


My editor (emacs) does a great job at formatting Python code. If your compiler and your eyes get enough information about how code is structures from indentation so should your editor.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: