To read all comments associated with this story, please click here.
:)
Ada is a beautiful language too. I had the opportunity to use it at DEC (there are actually parts of the VMS that are implemented in it).
I also wrote several IS applications with it.
I guess I don't understand some of the comments people are making about language (A) sucks because of this or language (B) makes bad programmers.
All languages have pluses and minuses. It is how you, the developer, uses them that makes an application sink or swim.
Maybe students just are not being taught proper usage of data structures and algorithms anymore? Maybe Analysis and Design have fallen by the wayside? I don't know... in "my day" analyzing the problem and designing a solution was far more important than the language chosen to implement the application, altho' the language selection WAS part of the design.
Personally, I like ALL LANGUAGES. Each one is unique and has character of its own. Young developers should learn to appreciate the nuances of each new language they encounter and how each language can be leveraged in a given situation.
"Too bad the authors of Python hadn't had to write enough COBOL or Fortran to understand what a bad idea using indentation as a syntactic element is."
There are many objectionable things in Python, but the indentation seems to be criticized only by people that never used the language.
The indentation rules in Python are exactly those that any half decent programmer already follows in *every* language (and Python doesn't impose any specific indentation style, just *any* indentation style).
I think the complaint is more about what happens in large-scale projects when people invariably mess up the indentation guidelines and keep the script from running. I munged up some C code pretty bad the other day, because our policy is to use tabs to indent, but I was working on some code that had 3-space indents (btw --- what kind of uncivilized jackass uses 3-space indentation?).
The indentation rules in Python are exactly those that any half decent programmer already follows in *every* language (and Python doesn't impose any specific indentation style, just *any* indentation style).
The rule that statements are terminated by line endings and that multiple statements cannot appear on a single line pretty much blows that claim out of the water.
There are programming idioms, such as manual loop unrolling, which are clearer when multiple statements are allowed on a line.
Also, the tab replacement rule pretty much negates any advantage that using alignment to indicate block nesting gives you because you can't tell when reading the code how the indentation is going to work after tab replacement.
It seems to me that the people most put off by the idea of indentation based syntax have always been programmers for whom the word 'refactor' might as well be a reference to an obscure foreign capital. I remember mentioning Python's syntax to a colleague who was completely revulsed. Later I found out that his idea of routines were 100-1000 line tracts of utterly unreadable spaghetti.
Best regards,
Steve
Bad guess in this case. I've been a believer in loose coupling, implemenation hiding, and doing one thing per function since before the term 'object oriented' was invented.
My objections to programming languages that try to enforce good practice dates back to Dykstra's observation, in the context of Pascal, that you can "write Fortran in any language".
Readability is a function of programmer discipline, not a feature of a language.
?! Pure personal opinion. I "personally" loved FORTRAN and it was one of my favorite languages to implement IS applications in the late 80's and early 90's. It was fast, had a clean layout, simple syntax and on a VAX running VMS could link into and use any graphical library you wanted. You could also implement modern data structures yourself if you needed them.
The biggest problem with FORTRAN is that it creates this single-threaded array-centric mindset in the people who use it. It recently fell on me to maintain some data collection software which was obviously written by a FORTRAN programmer outside our company. It's so bad. Dynamic memory allocation? Pshaw. Locking? Never heard of it. Win32 message loop? What's that?
In my (admittedly limited) experience, Java tends to corrupt the mind less than does FORTRAN or C. At least a Java guy will err on the side of too much abstraction, or too much dynamicism, or too much locking or thread-safety, because Java kind of programs you to do that. When it comes time to extend the software later, that's less of a pain to deal with than not enough of these things.
The only language I feel has ever successfully used indentation is part of it's syntax is Haskell, mostly because the functional style lends itself to small, bite-sized chunks -- and I'm not going to argue just how "functional" Python is.
Even in Haskell, though, it's a "wrapper" for the more common braces/parentheses (C- or Lisp-style) hierarchy and is internally translated into this style before compilation!
Indentation-only makes decent lambdas / anonymous functions nearly impossible in Python, it appears.





Member since:
2006-02-15
a mash-up of COBOL and Lisp, with the best parts of either left out.
Too bad the authors of Python hadn't had to write enough COBOL or Fortran to understand what a bad idea using indentation as a syntactic element is.