Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror

Comment Re: What I think of Python ... (Score 1) 103

I'm the one that mentioned that 500LoC thing. Sorry to horrify you, I wasn't talking about 500 LoC files, I referred to "units" (function definitions, data structures, etc) *within* (often much larger) files.

Your preference for under 100LoC files, a few thousand LoC total for Python programming just confirms that block-by-indentation makes Python unsuited for "large and complicated systems".

You'll easily reach 500LoC just validating a not too complicated web form (for example, to fill an invoice). Splitting that code would make it much more difficult to maintain.

I don't much like Python, but I don't regard it as a toy language.

I'd also like to commend getuid()'s wise two words. Spoken as a true programmer in the saddle, sir!

Comment Re:What I think of Python ... (Score 0) 103

its as good a way of indicating code blocks as any other..and by far the most elegant and readable..but ok opinions..

Sorry, not as good as any other:

1) "white space" (in truth, only horizontal white space) is by definition invisible. So using *only* white space to signify a block is in fact assigning semantics to the invisible
2) ... compounded by the fact that the TAB character (still invisible, just like SPACE) has different widths depending on the horizontal position, the editor configuration, and so on
3) ... therefore, what you get is a programming language that does not support reliable auto-indentation on editors
4) ... not enough redundancy symbolizing blocks so that trivial structure errors are caught at the lexical analysis step
5) ... nor enables the use of folding editors: when there is a fair amount of block nesting you can't fold blocks to gain an appreciation of the code structure at a selected depth

So, essentially you are getting readability (if you are of that opinion) at the expense of significance. But that readability quickly vanishes when you have longish source that doesn't fit in one screen or page.
If Python added (optional) braces to define blocks, I'd switch to it in a second. By optional I mean "if the first non-blank character in a line is a "'{', then that describes the start of a block within which indentation is non-significant until the closing '}' appears". You'd still be able to auto-indent, or to miss spaces or tabs, and the code would still be understandable by the compiler.
As it is, a mere, trivial 500 LoC unit becomes a nightmare to debug at a single glance. Me, I've got better things to do than counting invisible stuff.

Comment Re:Not backwards compat, DEFAULT backward compat. (Score 1) 128

That requires having two different versions of perl installed on the same system. That's one way. But it's not the best way. Much simpler:

It doesn't require two versions of perl. perl7 can be a symlink to plain perl. Different behaviour based on the program name, like grep/egrep/fgrep, It also does not require any change at all on existing scripts.

Slashdot Top Deals

System checkpoint complete.

Working...