Re:In praise of Go or "Why I moved from Python and C++ to Go"
by stcredzero on Tuesday November 16, 2010 @11:59PM
(#1912984)
This "danger" actually forces the programmer to read through the code he is pasting by indenting.
Read through, or partly rewrite? More of the latter than the former, IMO. If you're only reading then 4 spaces is often indistinguishable from a tab.
Sounds like the "block indenting" style in Smalltalk. Kent Beck favored it because it made bad Smalltalk code look bad. (Hard to read.) I like the idea, but in reality, it's too idealistic and not nearly practical enough.
Re:In praise of Go or "Why I moved from Python and C++ to Go"
by yesimahuman on Tuesday November 16, 2010 @10:54PM
(#1912828)
The biggest error I have with pasting is that the pasted code uses spaces where I use tabs. They look like the same indent level but they are not.
A good old ggVG= solves that though in vim
Re:In praise of Go or "Why I moved from Python and C++ to Go"
by chunkbot on Tuesday November 16, 2010 @11:14PM
(#1912880)
I use Emacs, and I can't remember the last time I manually indented a line of code. Most of my non-web programming is in Erlang, Lisp, and C. My editor does the indentation for me.
Re:In praise of Go or "Why I moved from Python and C++ to Go"
by hasenj on Tuesday November 16, 2010 @11:07PM
(#1912869)
gg=G also works; one less character
I would argue that this is actually a feature of the language. This "danger" actually forces the programmer to read through the code he is pasting by indenting.
Also, how many pairs of source code fragments share the same variable names? This argument is quite shallow.