[Home]Python

ec2-3-17-74-227.us-east-2.compute.amazonaws.com | ToothyWiki | RecentChanges | Login | Webcomic

Just when you thought it was safe, the whitespace-sensitive languages come back out of the woodwork..

(Vitenka)
In the sense of a ComputerLanguage?, Python is a horrible thing.  It's a ScriptingLanguage? which means that it is useful for QuickAndDirty? prototyping and little tasks that aren't worth a full program.  But it's WhiteSpace? sensitive!  So you cannot usefully edit it without an IDE?.
What are you talking about? Python is the best language ever! I do everything in python! How dare you defile its genius? That's like saying vi is better than emacs! - CorkScrew
One word: viper-mode. --NT

Right.  Having used it quite a lot more, it has some serious advantages.  It is wonderful as a macro language.  If you have, say, a game and want players to be able to write scripts for it along the line of "player Shoots AND nearby(enemy) kill enemy" then it is wonderful - full OO and messaging lets you define player, shoots, enemy - nearby can be a mapping function and so on.  This kind of power I've not seen outside of SmallTalk.
It is also pretty readable as a C-like language (providing they didn't use this macroing power) - I've done cross-checks of other peoples work in it and it's been pretty comprehensible.
Decent libraries - and currently documented well enough.  It really is well designed for quicky network apps.
But.  It's still whitespace sensitive.  This is still BrainDamaged?.
It doesn't really do GUI stuff without extending it - and none of the extensions are really that great yet.  Tolerable at best, I'd say.
It's not fast.  This means it's not really well suited to BackEnd? (CGI) type applications.  It's fine for the client, though.
It's not sandboxed.  A python app can trash your system just the same as a binary.  Given where it is aimed, this is a shame.

(Someone else?)
As a language, it's on a par with PHP and others of its ilk - lots of nice text processing functions, direct access to ports and net protocols.  Nothing to really fault it there.

And it's a heck of a lot more readable than Perl.

(MoonShadow)
One does not have to obfuscate Perl when one writes it. Perl can be perfectly readable.
One does not have to obfuscate Perl when one writes it.  Perl obfuscates itself. --Angoel

(PyTom)
I dare say that it's not all that fair to consider Python to be just a ScriptingLanguage?. It actually scales fairly well to at least medium sized programs such as BitTorrent and RenPy. While its speed is not the best yet, most applications don't hinge on raw processing speed, and there's always the argument that computers are much much cheaper than programmers in a business environment. That being said, there are projects such as Psyco and PyPy? that are working to speed Python up.
ScriptingLanguage? isn't an insult, you know :)  BitTorrent clients work great in python.  BitTorrent trackers - though the reference is python, you'd be fairly daft not to use something better suited.  --Vitenka

Python is intended to be edited in a modern text editor that includes syntax highlighting, automatic indentation, and the ability to shift blocks of text left and right. If you have these features, then the whitespace sensitivity really isn't an issue. Indeed, you're basically following the same rules you do  when writing good C, C++, Java, C#, Perl, etc... it's just that Python uses it to indicate program structure.
Except that generations of programmers have been trained to not see WhiteSpace?.  And tabs and spaces should be invisible.  That said, as long as you're editing in something sensible like Eclipse which can present me with the view of the code that I like (ie. with brackets) it becomes a non-issue.  But very very often (especially with a simple script) you find yourself needing to quickly add a bit with whatever comes to hand.  And python's inability to support this (and its being harder to read) is a bad bad thing.  Oh, and whilst I'm ranting on purely personal terms - the issue of indentation style is not a settled one.  --Vitenka

I disagree that generations of programmers have been trained to not see indentation. (WhiteSpace? is a different matter than indentation... whitespace is not overly significant in Python apart from the indentation of a logical line.) While there's a lot of debate on indentation style, the overwhelming consensus is that indentation is good and should be used. Python doesn't mandate a particular amount of indentation, just that lines in a block need to be indented (by any amount) relative to an enclosing block, and that the indentation within a block be consistent. Just about any indentation style recommends these things... It's just stuff like brace placement (moot in python) that they differ about. --PyTom

[ESR's take].



ChrisHowlett is having to write FV tests in Python. Is there anyone out there who writes Python in VisualSlick? version 5, and has a file extension set-up for it? It's a little annoying not to have syntax properly shown up.




Also a species of snake that kills its prey by constricting them



CategoryComputing

ec2-3-17-74-227.us-east-2.compute.amazonaws.com | ToothyWiki | RecentChanges | Login | Webcomic
This page is read-only | View other revisions | Recently used referrers | List subpages
Last edited June 28, 2005 11:51 am (viewing revision 21, which is the newest) (diff)
Search: