3 ms·
> There is no redundant signal that can be checked for a discrepancy that could indicate a problem. What’s the problem with having no redundancy? By the same l
by xigoi 2y ago
> There is no redundant signal that can be checked for a discrepancy that could indicate a problem.
What’s the problem with having no redundancy? By the same logic, we should require numerals to be spelled out in words so the compiler can check if the programmer didn’t accidentally write a different number.
def fahrenheit_to_celsius(x): {
return (x - 32 [thirty two]) * 5 [five] / 9 [nine];
}
- kazinator 2y agoIf we primarily relied on a whitespace representation of numbers, it would help to have digits there for the machine to look at and possibly diagnose against the whitespace.
- necovek 2y ago(Almost) Every programmer in the world depends on whitespace to understand code: are you claiming that's not true? If humans can do it, why wouldn't computer programs like interpreters do it?
- kelipso 2y agoRedundancy reduces likelihood of bugs. Your numbers example would too but it's obviously too much work for not enough benefit.
- xigoi 2y agoBraces are also too much work for not enough benefit.
- kelipso 2y agoGiven the chronic inconvenience of significant whitespace, absolutely not.
- necovek 2y agoThat's an opinion that is largely disproven by the amount of working Python code in the world. Why is it so hard to accept that this is your personal preference and is really not an "objective" statement?
- kelipso 2y agoThe reason for the popularity of python is mainly due to advertising it to programming newbies and non-programmers, not due to significant whitespace.
- necovek 2y agoI never brought popularity up: that mostly leads to lots of small snippets but not a big amount of working code. You can have an unpopular language with a few productive actors producing lots of code. I argue that "chronic inconvenience" is disproven by so many working programs. Even if one argues it's an inconvenience, it is a minor one or it would be hard for non-newbies to produce so much with Python.
- kelipso 2y agoIt’s a minor inconvenience, sure, I use python myself, but it’s definitely a chronic one. It annoys me every single time I code in python.
- xigoi 2y agoIt’s thee braces that are inconvenient. I have to indent my code anyway, so why add another redundant marker that I’ll have to mentally filter out all the time?
- necovek 2y agoThey are certainly more work and why I prefer significant whitespace, but I wouldn't really say "too much". They are a preference, but neither is objectively better or worse.