I've decided to start posting some of my thoughts about programming languages and software development tools. Since I so love to bitch and moan, I'll motivate myself by starting off with a complaint about the language I use every day at work, Python. (
And so, donning my asbestos smoking jacket, I wax philosophical about syntax: )
Comments 7
Reply
Reply
Reply
That said, I don't understand why they don't also use explicit delimiters. It may be theoretically redundant, but I agree with you -- there are too many whitespace-eating display methods, and too many ways to screw up your own indentation, to be purist about it.
Reply
Thanks.
Reply
I've been looking for some way to add delimiters in python. Writing a parser seems a bit excessive and since I can't find any on the web I think I'm just going to use "pass" as a close-block delimiter.
def blabla(self):
dosomework
pass
It does look a bit weird but it doesn't use much more space than "}" and after a while I'll probably get used to it. At least, next time someone messes up my code/indentation with some exotic editor I'll be able to see where blocks actually end :)
Now, if only python could force me to do this...
I've always felt strongly about this but I wasn't exactly sure why. Thanks for describing this in details and in a very clear way.
Clem
Reply
Reply
Leave a comment