Don't complain about lack of options. You've got to pick a few when you do multiple choice. Those are the breaks.
Feel free to suggest poll ideas if you're feeling creative. I'd strongly suggest reading the past polls first.
This whole thing is wildly inaccurate. Rounding errors, ballot stuffers, dynamic IPs, firewalls. If you're using these numbers to do anything important, you're insane.
Unlike many here, I do not mind syntactic white space. In fact, I actually prefer languages that insist that they are laid out in a specific way. The reason for this is that we read code far more often than we write it. Looking at somebody else's code (or even one's own code sometime after it was written) can often be difficult until you get used to their style, and if the code has been worked on by several people that style can (but shouldn't ever) change part way through reading the file.
Languages such as Python, Go and even .yml ensure that the style of the code changes as little as possible no matter who wrote it. Personally, that makes it much easier for me to get stuck in to groking someone else's code. Being able to pick up any Python or Go code and understand its structure is a great benefit to me. It saves me time.
One complaint that I have heard against an enforced layout is that different companies have different requirements. However, modern day IDEs can cater for this and you can, within certain limits, modify the output slightly. They can also reformat any code you throw at them into a consistent specification. I know that some will now argue that their preferred editor does not support this or is more versatile, or whatever. Fine, you can carry on. I will probably not be looking at your code anyway so it will not affect me.
YMMV.
-- I am not interested in knowing who people are or where they live. My interest starts and stops at our servers.
My main beef with syntactically significant whitespace is the annoyance when you inevitably experience bugs ranging from mere syntax errors up to serious control-flow issues because you hit the space bar only 7 times instead of 8 or you cut and pasted something with the "wrong" indentation and its just a PITA. Yeah yeah I heard it all about "use a better IDE" but its even MORE annoying when you're already using the better IDE and it epic fails anyway.
Another serious annoyance is loser-style-IDEs where they surround a very small code window with crap that isn't code, and the feel you get when forced to edit while viewing the code thru a postage-stamp, the algo or code would be much clearer if you could see it all at the same time but now, you have to follow some stupid rule that makes the code harder to understand because you can't see it all.
Finally some other languages can lint or format to highlight incorrect code. What I'm saying is you don't really gain anything by proper indentation of the wrong code. "Its the correct shape" isn't helpful if its the wrong thing. And I'm not sure "correct shape" is highlighting most important or most expensive to fix errors. I donno.. take your classic fencepost error; that can be beautifully indented, giving a false sense of security when the problem is you thought arrays start at index 0 instead of 1 or vice versa. "I got great news, I created a PITA to fix a problem you don't have via creating a problem you won't like"
Another serious annoyance is loser-style-IDEs where they surround a very small code window with crap that isn't code, and the feel you get when forced to edit while viewing the code thru a postage-stamp, the algo or code would be much clearer if you could see it all at the same time but now, you have to follow some stupid rule that makes the code harder to understand because you can't see it all.
However, you can get good and bad IDEs for any language. Mine provides help when I want it but shows me just code when I tell it to. Literally just the code, and it is a single key-press to change between the two.
-- I am not interested in knowing who people are or where they live. My interest starts and stops at our servers.
I have had to start using VSCode and Visual Studio recently and I find them very unfriendly. I need to invest some time in learning how to configure them properly. The program source is full of lines and dots showing the indentation which I find and real pain in the neck. Then there are the incessant pop-ups offering to complete what I'm typing for me, interrupting my train of thought. By default, they only show one window of source. I usually have a minimum of three side-by-side and I can't stand having to fight with the IDE to get the layout of the windows I want.
Finally, people who use these IDEs have some funny ideas about how to lay the source out on the disk. For example, having one directory ("folder") for the headers and another for the source regardless of what they're for.
I am reminded of the Two Ronnies sketch where the books in the library are arranged by colour, not by title, author or content.
For what it's worth, back when I was wrangling a lot of Python professionally, I found that a properly configured vim worked just fine for editing it: You just needed to set your tabs to = 4 spaces, and potentially add a check to convert any stray tab characters to spaces, and you were well on your way. So no need for really fancy stuff.
-- The only thing that stops a bad guy with a compiler is a good guy with a compiler.
(Parenthesis (pile-ups (at (the (end (of (Lisp (code))))))))
I'll give these people credit, you have to be a brave man to edit LISP code using vi or vim.
If you use a real IDE like emacs or similar, there's parenthesis management modes to take care of it, if you're using an IDE and hitting shift-9 and shift-0 a lot you're probably using it wrong.
(Score: 0) by Anonymous Coward on Sunday October 13, @09:57PM
by Anonymous Coward
on Sunday October 13, @09:57PM (#1376857)
And yet when people say the same thing about Python and other languages with syntactically-significant whitespace, all of a sudden those same arguments are just excuses.
you have to be a brave man to edit LISP code using vi or vim
Like emacs, Vim has distributions with extensions that integrate LSP support and tree-sitter to parenthesis issues and navigate by syntax.
Regardless, new editors following tree-sitter* blur the lines between IDE and editors on this sorts of functionalities due to being able to understand the syntax trees and thus support navigation by tree elements (functions...) and open/close parenthesis automatically.
* Zed, Lapce, Helix, Kakoune... Helix's keybindings in particular illustrate how tight tree-sitter integration leaves makes previous distinctions between IDEs and editors unclear: https://docs.helix-editor.com/keymap.html#unimpaired [helix-editor.com]
Guilty party here. I'm not sure why I thought Ruby had this. I have a vague inkling that I was thinking not just about indentation, but other forms of whitespace-sensitivity like whether or not you can put a space between a function name and its arguments list (e.g. function (arg), which is something some Java monkey might type intentionally).
"According to the book Eloquent Ruby a sensible practice is to use two spaces per line for indentation since this is clearly an indent, but without using up too much room on the line. The book also advises not to use tabs since there is no universal length of a tab, so they can vary in length greatly."
So it appears that there is a recommended spacing for the language.
-- I am not interested in knowing who people are or where they live. My interest starts and stops at our servers.
It doesn't, not really. Semicolons can be used to end statements but they are not mandatory the way they are in Perl and C: a newline can do so as well if the statement is syntactically complete, but if a statement is not complete, e.g. if a line ends with an operator like +, the statement is considered continued on the next line. So strictly speaking, while newlines can be syntactically significant in Ruby, it is fairly minimal, a very far cry from how languages like Python use whitespace to do block structuring. This means it is possible to write Ruby one-liners like Perl one-liners.
-- Numquam ponenda est pluralitas sine necessitate.
(Score: 0) by Anonymous Coward on Tuesday October 15, @04:32AM
by Anonymous Coward
on Tuesday October 15, @04:32AM (#1377045)
With that sort of definition, Haskell doesn't either. Haskell allows you to use indentation in lieu of other block syntax. In fact, many languages that use the off-side rule either do so optionally (opt in or opt out) or only for a subset of statements. Most of the ones that don't are influenced, directly or indirectly, by ABC or ISWIM.
For me the annoyance with Perl isn't the sigils, it's Leaning Toothpick Syndrome (TM) [wikipedia.org]. Behold the regex for matching URLs containing a specific subdirectory: m/ftp:\/\/[^\/]*\/pub\//
Of course, other languages [wikipedia.org] aren't immune, either; here's another example from C++: std::regex re{ R"d(s/"\([^"]*\)"/'\1'/g)d" };
... so I guess my problem isn't with Perl so much as it is poorly written regular expressions.
-- "Space Exploration is not endless circles in low earth orbit."
-Buzz Aldrin
(Score: 2, Interesting) by Anonymous Coward on Monday October 14, @02:38AM
(1 child)
by Anonymous Coward
on Monday October 14, @02:38AM (#1376880)
Most languages have a way around that problem. Perl and C++ both have ways to make it so the special characters aren't given special meaning. They can have other delimiters set, increase the "rawness" of strings, or use special operators or functions to get results.
When using a nice language [wikipedia.org] that is more gooder than Java, I don't mind any of the idiosyncrasies this pole is complaining about.
[ This program prints "Hello World!" and a newline to the screen; its length is 106 active command characters. [It is not the shortest.]
This loop is an "initial comment loop", a simple way of adding a comment to a BF program such that you don't have to worry about any command characters. Any ".", ",", "+", "-", "<" and ">" characters are simply ignored, the "[" and "]" characters just have to be balanced. This loop and the commands it contains are ignored because the current cell defaults to a value of 0; the 0 value causes this loop to be skipped. ] ++++++++ Set Cell #0 to 8 [ >++++ Add 4 to Cell #1; this will always set Cell #1 to 4 [ as the cell will be cleared by the loop >++ Add 2 to Cell #2 >+++ Add 3 to Cell #3 >+++ Add 3 to Cell #4 >+ Add 1 to Cell #5 <<<<- Decrement the loop counter in Cell #1 ] Loop until Cell #1 is zero; number of iterations is 4 >+ Add 1 to Cell #2 >+ Add 1 to Cell #3 >- Subtract 1 from Cell #4 >>+ Add 1 to Cell #6 [<] Move back to the first zero cell you find; this will be Cell #1 which was cleared by the previous loop <- Decrement the loop Counter in Cell #0 ] Loop until Cell #0 is zero; number of iterations is 8
The result of this is: Cell no : 0 1 2 3 4 5 6 Contents: 0 0 72 104 88 32 8 Pointer : ^
>>. Cell #2 has value 72 which is 'H' >---. Subtract 3 from Cell #3 to get 101 which is 'e' +++++++..+++. Likewise for 'llo' from Cell #3 >>. Cell #5 is 32 for the space <-. Subtract 1 from Cell #4 for 87 to give a 'W' <. Cell #3 was set to 'o' from the end of 'Hello' +++.------.--------. Cell #3 for 'rl' and 'd' >>+. Add 1 to Cell #5 gives us an exclamation point >++. And finally a newline from Cell #6
-- One thing British schools lack that American schools have is active shooter drills so we are prepared.
While Perl "line noise" reg-exes are certainly a problem, the sigils changing regularly can also be a problem, because it means that you have an extra hurdle looking for all instances where something is accessed or modified, and don't make it any simpler to understand the data structure in use.
-- The only thing that stops a bad guy with a compiler is a good guy with a compiler.
the only relevant meaning of any code is that one to the machine
While it is true that the code must compile (or interpret) and run successfully; as a programmer your PRIMARY audience is not the computer, but rather it is another human being who will come along later, perhaps much later, who will need to be able to understand your code.
-- One thing British schools lack that American schools have is active shooter drills so we are prepared.
Worse is to refuse to use any techniques to obviate these syntactic infundibula. For example,parenthesis pileup is easily dealt with using a trick like Racket's parendown [racket-lang.org]
(Score: 2, Interesting) by janrinok on Sunday October 13, @07:31AM (1 child)
Unlike many here, I do not mind syntactic white space. In fact, I actually prefer languages that insist that they are laid out in a specific way. The reason for this is that we read code far more often than we write it. Looking at somebody else's code (or even one's own code sometime after it was written) can often be difficult until you get used to their style, and if the code has been worked on by several people that style can (but shouldn't ever) change part way through reading the file.
Languages such as Python, Go and even .yml ensure that the style of the code changes as little as possible no matter who wrote it. Personally, that makes it much easier for me to get stuck in to groking someone else's code. Being able to pick up any Python or Go code and understand its structure is a great benefit to me. It saves me time.
One complaint that I have heard against an enforced layout is that different companies have different requirements. However, modern day IDEs can cater for this and you can, within certain limits, modify the output slightly. They can also reformat any code you throw at them into a consistent specification. I know that some will now argue that their preferred editor does not support this or is more versatile, or whatever. Fine, you can carry on. I will probably not be looking at your code anyway so it will not affect me.
YMMV.
I am not interested in knowing who people are or where they live. My interest starts and stops at our servers.
(Score: 4, Touché) by DrkShadow on Sunday October 13, @06:49PM
It's akin to "Dress for Success"
(Score: 5, Insightful) by VLM on Sunday October 13, @04:08PM (9 children)
My main beef with syntactically significant whitespace is the annoyance when you inevitably experience bugs ranging from mere syntax errors up to serious control-flow issues because you hit the space bar only 7 times instead of 8 or you cut and pasted something with the "wrong" indentation and its just a PITA. Yeah yeah I heard it all about "use a better IDE" but its even MORE annoying when you're already using the better IDE and it epic fails anyway.
Another serious annoyance is loser-style-IDEs where they surround a very small code window with crap that isn't code, and the feel you get when forced to edit while viewing the code thru a postage-stamp, the algo or code would be much clearer if you could see it all at the same time but now, you have to follow some stupid rule that makes the code harder to understand because you can't see it all.
Finally some other languages can lint or format to highlight incorrect code. What I'm saying is you don't really gain anything by proper indentation of the wrong code. "Its the correct shape" isn't helpful if its the wrong thing. And I'm not sure "correct shape" is highlighting most important or most expensive to fix errors. I donno.. take your classic fencepost error; that can be beautifully indented, giving a false sense of security when the problem is you thought arrays start at index 0 instead of 1 or vice versa. "I got great news, I created a PITA to fix a problem you don't have via creating a problem you won't like"
(Score: 2) by turgid on Sunday October 13, @06:55PM (7 children)
Another serious annoyance is loser-style-IDEs where they surround a very small code window with crap that isn't code, and the feel you get when forced to edit while viewing the code thru a postage-stamp, the algo or code would be much clearer if you could see it all at the same time but now, you have to follow some stupid rule that makes the code harder to understand because you can't see it all.
Tell me about it.
I refuse to engage in a battle of wits with an unarmed opponent [wikipedia.org].
(Score: 4, Informative) by janrinok on Sunday October 13, @07:14PM (6 children)
I also agree.
However, you can get good and bad IDEs for any language. Mine provides help when I want it but shows me just code when I tell it to. Literally just the code, and it is a single key-press to change between the two.
I am not interested in knowing who people are or where they live. My interest starts and stops at our servers.
(Score: 2) by turgid on Sunday October 13, @07:39PM
I have had to start using VSCode and Visual Studio recently and I find them very unfriendly. I need to invest some time in learning how to configure them properly. The program source is full of lines and dots showing the indentation which I find and real pain in the neck. Then there are the incessant pop-ups offering to complete what I'm typing for me, interrupting my train of thought. By default, they only show one window of source. I usually have a minimum of three side-by-side and I can't stand having to fight with the IDE to get the layout of the windows I want.
Finally, people who use these IDEs have some funny ideas about how to lay the source out on the disk. For example, having one directory ("folder") for the headers and another for the source regardless of what they're for.
I am reminded of the Two Ronnies sketch where the books in the library are arranged by colour, not by title, author or content.
I refuse to engage in a battle of wits with an unarmed opponent [wikipedia.org].
(Score: 2) by turgid on Sunday October 13, @07:43PM (4 children)
Here it is. This is how people arrange source code nowadays [youtube.com]. I blame these IDEs.
I refuse to engage in a battle of wits with an unarmed opponent [wikipedia.org].
(Score: 3, Funny) by janrinok on Sunday October 13, @08:06PM (3 children)
I'll have to try writing my code in the style of the big blue book.....
I am not interested in knowing who people are or where they live. My interest starts and stops at our servers.
(Score: 0) by Anonymous Coward on Sunday October 13, @09:55PM (2 children)
I'm not quite sure how useful Bluebook style would be for you, but here you go: https://en.wikipedia.org/wiki/Bluebook [wikipedia.org]
(Score: 1) by pTamok on Monday October 14, @04:02PM (1 child)
Hmm, and I thought it was a reference to Max Miller's Blue book [wikipedia.org].
Wrong Blue book. Might make a controversial style guide.
(Score: 0) by Anonymous Coward on Tuesday October 15, @10:17AM
There's also this: https://the-blue-book.eu/ [the-blue-book.eu]
https://cybersec4europe.eu/wp-content/uploads/2023/02/The-Blue-Book.pdf [cybersec4europe.eu]
(Score: 2) by Thexalon on Tuesday October 15, @10:12AM
For what it's worth, back when I was wrangling a lot of Python professionally, I found that a properly configured vim worked just fine for editing it: You just needed to set your tabs to = 4 spaces, and potentially add a check to convert any stray tab characters to spaces, and you were well on your way. So no need for really fancy stuff.
The only thing that stops a bad guy with a compiler is a good guy with a compiler.
(Score: 2) by VLM on Sunday October 13, @04:10PM (2 children)
I'll give these people credit, you have to be a brave man to edit LISP code using vi or vim.
If you use a real IDE like emacs or similar, there's parenthesis management modes to take care of it, if you're using an IDE and hitting shift-9 and shift-0 a lot you're probably using it wrong.
(Score: 0) by Anonymous Coward on Sunday October 13, @09:57PM
And yet when people say the same thing about Python and other languages with syntactically-significant whitespace, all of a sudden those same arguments are just excuses.
(Score: 2) by RamiK on Tuesday October 15, @11:11AM
Like emacs, Vim has distributions with extensions that integrate LSP support and tree-sitter to parenthesis issues and navigate by syntax.
Regardless, new editors following tree-sitter* blur the lines between IDE and editors on this sorts of functionalities due to being able to understand the syntax trees and thus support navigation by tree elements (functions...) and open/close parenthesis automatically.
* Zed, Lapce, Helix, Kakoune... Helix's keybindings in particular illustrate how tight tree-sitter integration leaves makes previous distinctions between IDEs and editors unclear: https://docs.helix-editor.com/keymap.html#unimpaired [helix-editor.com]
compiling...
(Score: 2, Insightful) by Opyros on Sunday October 13, @05:09PM (7 children)
Does Ruby have syntactically significant whitespace? I hadn’t thought so.
(Score: 3, Touché) by janrinok on Sunday October 13, @06:09PM (2 children)
Apparently not - but we cannot edit Polls unfortunately.
I will ask the submitter to stand in the corner for 10 minutes facing the wall.
I am not interested in knowing who people are or where they live. My interest starts and stops at our servers.
(Score: 2) by Samantha Wright on Tuesday October 15, @03:23PM
Guilty party here. I'm not sure why I thought Ruby had this. I have a vague inkling that I was thinking not just about indentation, but other forms of whitespace-sensitivity like whether or not you can put a space between a function name and its arguments list (e.g. function (arg), which is something some Java monkey might type intentionally).
(Score: 3, Informative) by janrinok on Sunday October 13, @06:15PM (1 child)
Although I also found this:
So it appears that there is a recommended spacing for the language.
I am not interested in knowing who people are or where they live. My interest starts and stops at our servers.
(Score: 1) by Opyros on Monday October 14, @02:14AM
So, the Ruby equivalent of Python Enhancement Proposal 8 [python.org], which recommends 4 spaces per indent level.
(Score: 3, Informative) by stormwyrm on Monday October 14, @03:10AM (1 child)
Numquam ponenda est pluralitas sine necessitate.
(Score: 0) by Anonymous Coward on Tuesday October 15, @04:32AM
With that sort of definition, Haskell doesn't either. Haskell allows you to use indentation in lieu of other block syntax. In fact, many languages that use the off-side rule either do so optionally (opt in or opt out) or only for a subset of statements. Most of the ones that don't are influenced, directly or indirectly, by ABC or ISWIM.
(Score: 2) by Zinho on Sunday October 13, @09:15PM (5 children)
For me the annoyance with Perl isn't the sigils, it's Leaning Toothpick Syndrome (TM) [wikipedia.org]. Behold the regex for matching URLs containing a specific subdirectory:
m/ftp:\/\/[^\/]*\/pub\//
Of course, other languages [wikipedia.org] aren't immune, either; here's another example from C++:
std::regex re{ R"d(s/"\([^"]*\)"/'\1'/g)d" };
... so I guess my problem isn't with Perl so much as it is poorly written regular expressions.
"Space Exploration is not endless circles in low earth orbit." -Buzz Aldrin
(Score: 2, Interesting) by Anonymous Coward on Monday October 14, @02:38AM (1 child)
Most languages have a way around that problem. Perl and C++ both have ways to make it so the special characters aren't given special meaning. They can have other delimiters set, increase the "rawness" of strings, or use special operators or functions to get results.
(Score: 4, Funny) by Dr Spin on Monday October 14, @10:36AM
We have upped our standards, so UP YOURS!
Taken from an advert for the "London Evening Standard".
Warning: Opening your mouth may invalidate your brain!
(Score: 2) by DannyB on Tuesday October 15, @03:16PM (1 child)
When using a nice language [wikipedia.org] that is more gooder than Java, I don't mind any of the idiosyncrasies this pole is complaining about.
[ This program prints "Hello World!" and a newline to the screen; its
length is 106 active command characters. [It is not the shortest.]
This loop is an "initial comment loop", a simple way of adding a comment
to a BF program such that you don't have to worry about any command
characters. Any ".", ",", "+", "-", "<" and ">" characters are simply
ignored, the "[" and "]" characters just have to be balanced. This
loop and the commands it contains are ignored because the current cell
defaults to a value of 0; the 0 value causes this loop to be skipped.
]
++++++++ Set Cell #0 to 8
[
>++++ Add 4 to Cell #1; this will always set Cell #1 to 4
[ as the cell will be cleared by the loop
>++ Add 2 to Cell #2
>+++ Add 3 to Cell #3
>+++ Add 3 to Cell #4
>+ Add 1 to Cell #5
<<<<- Decrement the loop counter in Cell #1
] Loop until Cell #1 is zero; number of iterations is 4
>+ Add 1 to Cell #2
>+ Add 1 to Cell #3
>- Subtract 1 from Cell #4
>>+ Add 1 to Cell #6
[<] Move back to the first zero cell you find; this will
be Cell #1 which was cleared by the previous loop
<- Decrement the loop Counter in Cell #0
] Loop until Cell #0 is zero; number of iterations is 8
The result of this is:
Cell no : 0 1 2 3 4 5 6
Contents: 0 0 72 104 88 32 8
Pointer : ^
>>. Cell #2 has value 72 which is 'H'
>---. Subtract 3 from Cell #3 to get 101 which is 'e'
+++++++..+++. Likewise for 'llo' from Cell #3
>>. Cell #5 is 32 for the space
<-. Subtract 1 from Cell #4 for 87 to give a 'W'
<. Cell #3 was set to 'o' from the end of 'Hello'
+++.------.--------. Cell #3 for 'rl' and 'd'
>>+. Add 1 to Cell #5 gives us an exclamation point
>++. And finally a newline from Cell #6
One thing British schools lack that American schools have is active shooter drills so we are prepared.
(Score: 2) by Samantha Wright on Tuesday October 15, @03:26PM
Straight to jail!
(Score: 2) by Thexalon on Wednesday October 16, @12:12AM
While Perl "line noise" reg-exes are certainly a problem, the sigils changing regularly can also be a problem, because it means that you have an extra hurdle looking for all instances where something is accessed or modified, and don't make it any simpler to understand the data structure in use.
The only thing that stops a bad guy with a compiler is a good guy with a compiler.
(Score: 1) by pTamok on Monday October 14, @03:52PM
People who don't know how to use colons, semi-colons, and commas in written English, and anyone who eschews use of the Oxford comma.
Of course, anyone whose usage differs to mine is, without doubt, wrong.
There are also heathens who omit apostrophes where they should be present, and insert them where they should not.
(Score: 1, Redundant) by Mojibake Tengu on Monday October 14, @09:36PM (1 child)
Meaning of any code to a programmer is irrelevant, it's mere illusion.
In consistent reality, the only relevant meaning of any code is that one to the machine.
Rust programming language offends both my Intelligence and my Spirit.
(Score: 2) by DannyB on Tuesday October 15, @03:26PM
While it is true that the code must compile (or interpret) and run successfully; as a programmer your PRIMARY audience is not the computer, but rather it is another human being who will come along later, perhaps much later, who will need to be able to understand your code.
One thing British schools lack that American schools have is active shooter drills so we are prepared.
(Score: 4, Interesting) by hendrikboom on Tuesday October 15, @12:09AM
Worse is to refuse to use any techniques to obviate these syntactic infundibula.
For example,parenthesis pileup is easily dealt with using a trick like Racket's parendown [racket-lang.org]