I don't ever have indentation errors - or if I do, they aren't ever of a sort that pyscripter can't spot them.
Must be a what-you're-used-to thing...
I don't ever have indentation errors - or if I do, they aren't ever of a sort that pyscripter can't spot them.
Must be a what-you're-used-to thing...
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.
A good old ggVG= solves that though in vim
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.
A couple of years ago, however, I tried to help a friend trace an error in code on an active server. It came down to rewriting the code so that it looked exactly the same as before but somehow had the right whitespace instead of the wrong whitespace.
That experience left me with the strong belief that Python's whitespace approach is totally wrong and broken. Things that break in ways that are difficult to understand I can accept. Things that break in ways that are impossible to understand as such are unacceptable.
Yes, the whitespace thing can always be fixed - except on the random server where it desperately needs fixing. Systems where symbols that are meaningful don't appear are broken - it's not that a given problem with said symbol will appear often. It's how extreme the problem is when it does appear.
Given this, it's impossible for me to understand your claim that the white space approach is 'totally wrong or broken'. The leap from vague example (with a sample size of one) to all encompassing abstraction is too great.
Having said that, I'm keen to ensure that I don't pursue the wrong path. I picked python because many people I respected said it was a good 'jam for beginners'. But that can't be true if it's 'totally wrong and broken'.
Care to pony up with a proper account of your position?
The fix is to simply accept only tabs OR spaces as valid whitespace... then again, this is one of the things that annoys me about make, but I digress..
I think we solved this problem like, 20 years ago or something.
But all the fixes depend on completely controlling the environment and the code production process. They work but they add "global control" need that is a bit more extreme than other languages. This qualifies as a "weird fragility" in my mind. Considering how many other levels of any given system might have weird fragilities, why be willing to accept language that guarantees you'll need to deal with such fragility by it's very structure?
I'm sure I over-stated the problem when I first stated it ... but whenever I remember the situation, I feel the terribleness of it so I don't think it's unimportant.
I'm starting to get to the point of just wanting sexps everywhere...
* And after debugging production issues with proprietary compilers that had almost perfectly reliable hot-code loading...that's pretty minor. Not mixing up tabs and spaces probably covers it.