Tabs or spaces – Parsing a 1B files among 14 programming languages
101–110 of 124 posts
Re: Tabs or spaces – Parsing a 1B files among 14 programming languages
#102After 20+ years of listening to the tabs-vs-spaces debate and considering all the legitimate points that both sides have, many have made the following observation and it's what resonates with me the most: In an ideal perfect world, _all_ of programmers and _all_ text editor tools would use tabs specifically for indentation and spaces specifically for alignment. But, we don't live in that perfectly coordinated world s…
Personally, I don't find the value in alignment - indentation is all I do. I especially dislike alignment of this sort: var a_variable = 1; var another_variable = 2; var yet_another_variable = 3; which is just too fiddlesome and in fact makes it _harder_ for me to read.
Re: Tabs or spaces – Parsing a 1B files among 14 programming languages
#103They could just as easily have posted a study of who uses emacs vs. vim. Well, maybe not as easily, and we'd all sit here debating the pros and cons of either.
Tools like gofmt will, over time, make these discussions moot.
Re: Tabs or spaces – Parsing a 1B files among 14 programming languages
#104Earlier quoted context omitted.
Completely unrelated. Noticed you use Vala. Just curious, how do you find it? Do you just use it for GNOME related things (GUI building) or for other cases as well? Remember being interested in it a few years back. It seemed to be popular, but haven't followed it since.
Vala was my first introduction to OOP and since I was always working in a Unix environment C# was not an option for me. The bindings to develop GTK-based applications were good enough but still today I believe that using tools like Glade writing a GTK-based app in any other language is as easy as it is with Vala, the only advantage is that I can compile to C without having to write C all the time. It has worked well…
Yeah there is something appealing about compiling to C. It is a relatively easier target than LLVM or assembly. Nim is in that space, is making progress but it still suffers from a small community of developers.
Re: Tabs or spaces – Parsing a 1B files among 14 programming languages
#105C-x h
Whatever that does, with whatever type of source file, that's what I'm using.
Re: Tabs or spaces – Parsing a 1B files among 14 programming languages
#106Neither! http://nickgravgaard.com/elastic-tabstops/ “ A better way to indent and align code ” When I saw this, it was obvious to me that this was the true solution to the problem which both space and tab proponents try to solve.
Re: Tabs or spaces – Parsing a 1B files among 14 programming languages
#107Earlier quoted context omitted.
Right, not now you're dictating coding style to work around the warts associated with using tabs. If you use spaces there are no such issues because spaces don't change widths between editors.
The kind of formatting you suggest - aligning with spaces to get beautiful indenting - is a royal pain in the ass to edit. You change the function name to something a few characters shorter and now you have to change all the lines. It's prettier than the alternative, though (I still don't use it). I wish the pioneers of programming languages would have had the foresight to provide an automatic formatting tool and sta…
Re: Tabs or spaces – Parsing a 1B files among 14 programming languages
#108Earlier quoted context omitted.
Personally, I don't find the value in alignment - indentation is all I do. I especially dislike alignment of this sort: var a_variable = 1; var another_variable = 2; var yet_another_variable = 3; which is just too fiddlesome and in fact makes it _harder_ for me to read.
That's also hazardous when you later add an_even_longer_variable and then have to modify three extra lines to make them align.
Re: Tabs or spaces – Parsing a 1B files among 14 programming languages
#109Earlier quoted context omitted.
To be honest, no, because my formatting will not be broken after refactoring changing function name length.
What workflows do you have where renaming functions happens often enough that you need to optimize for it?
Re: Tabs or spaces – Parsing a 1B files among 14 programming languages
#110"One vote per file: Some files use a mix of spaces or tabs. We’ll count on which side depending on which method they use more." This makes results completely useless, as files of people who really do not care will count for one side or another randomly.
Also, I guess C-style block comments could cause an over-counting of spaces (but looking at the numbers, it seems that either the query takes this into account, or C code simply has a poor comment-to-code ratio)