I still have problems fathoming how Python managed to get such a big mindshare within the developer community with its icky syntax and forced use of whitespace. What makes it good? I have looked into the alternatives and they all seem to be better.
The general consensus seems to be that it was more readable than Perl and forced you to write more maintainable code at the right moment in history. Today it has an abundance of libraries and enough competent developers to be hard to ignore. To me the inconsistent naming in the standard library is a bigger flaw than the syntax, which is a matter of habit. Date and Unicode handling (the latter in both 2 and 3) follow…
Obfuscating “Hello World” in Python
11–20 of 59 posts
Re: Obfuscating “Hello World” in Python
#12Earlier quoted context omitted.
I've written an answer to this on this question on Quora: http://www.quora.com/Why-should-I-use-Python-over-Perl The short version is: Different people think differently and different languages require different thought models and as such appeal to different people. Different languages prioritize different computation models and as such are differently suited for different purposes. And lastly, different languages pr…
And people prefer different coding styles. One persons "icky syntax and forced use of whitespace" is another ones preference. At the same time, you trade your freedom of whitespace expression with simplicity when you need to understand or work with code written by others.
To be fair, that's a red herring in an age where most languages have tools available to clean up and reformat a weirdly formatted file directly in your editor. (I have Perl::Tidy bound to Ctrl+E and that combination gets hit more often than the space key, especially on code i am writing.)
Re: Obfuscating “Hello World” in Python
#13I still have problems fathoming how Python managed to get such a big mindshare within the developer community with its icky syntax and forced use of whitespace. What makes it good? I have looked into the alternatives and they all seem to be better.
Re: Obfuscating “Hello World” in Python
#14I still have problems fathoming how Python managed to get such a big mindshare within the developer community with its icky syntax and forced use of whitespace. What makes it good? I have looked into the alternatives and they all seem to be better.
- Compiles to standalone binaries, C++ using Nuitka and other methods such as PyInstaller
- Fast speed of development
- Syntax: matter of personal taste. But overall Python is very terse
- Large community, ~20 year vast resources for use and learning
- IronPython for .Net libraries and Jython for Java libraries
- Versatile and already in largescale use for systems, web, administration scripting, game scripting, 3d applications, data modeling, game creation, crossplatform GUI applications, glue code
- iOS/Android/desktop support with Kivy
- Portable, embeddable and extendable
- Focus on readability/maintainability
- One of few languages that covers nearly every possible need well, though not top tier in all
- Bridges nicely to either exploring lower level aspects, strongly tied to C (and by extension assembler). Also offers ways to start learning functional programming within Python
- Already installed on Mac and most Linux distros
- The culture. Join us in a Python Meetup, and find out.
I did my homework before choosing to learn Python, and there is a huge con with Python3 (which many of my items do not apply to right now). But overall I'm not sure what your definition of better is, but I haven't found anything better or even close.
Re: Obfuscating “Hello World” in Python
#15Earlier quoted context omitted.
The general consensus seems to be that it was more readable than Perl and forced you to write more maintainable code at the right moment in history. Today it has an abundance of libraries and enough competent developers to be hard to ignore. To me the inconsistent naming in the standard library is a bigger flaw than the syntax, which is a matter of habit. Date and Unicode handling (the latter in both 2 and 3) follow…
Most of the inconsistent naming and unicode handling was fixed in Python 3.
Re: Obfuscating “Hello World” in Python
#16Earlier quoted context omitted.
And people prefer different coding styles. One persons "icky syntax and forced use of whitespace" is another ones preference. At the same time, you trade your freedom of whitespace expression with simplicity when you need to understand or work with code written by others.
> you trade your freedom of whitespace expression with simplicity when you need to understand or work with code written by others. To be fair, that's a red herring in an age where most languages have tools available to clean up and reformat a weirdly formatted file directly in your editor. (I have Perl::Tidy bound to Ctrl+E and that combination gets hit more often than the space key, especially on code i am writing.)
Reformatting also breaks line numbers which makes it difficult to talk about the code with others.
Re: Obfuscating “Hello World” in Python
#17I still have problems fathoming how Python managed to get such a big mindshare within the developer community with its icky syntax and forced use of whitespace. What makes it good? I have looked into the alternatives and they all seem to be better.
Re: Obfuscating “Hello World” in Python
#18Re: Obfuscating “Hello World” in Python
#19Earlier quoted context omitted.
> you trade your freedom of whitespace expression with simplicity when you need to understand or work with code written by others. To be fair, that's a red herring in an age where most languages have tools available to clean up and reformat a weirdly formatted file directly in your editor. (I have Perl::Tidy bound to Ctrl+E and that combination gets hit more often than the space key, especially on code i am writing.)
You are not just looking at code in your editor and the majority of tools are not able to just reformat code. Reformatting also breaks line numbers which makes it difficult to talk about the code with others.
Ctrl+C and Ctrl+V are a thing. The last time i looked at code on paper was years ago. In practice over the past 9 years i have not looked at any piece of code that i wasn't able to tidy so i could work with it.
> Reformatting also breaks line numbers which makes it difficult to talk about the code with others.
Ctrl+Z is also a thing, as is a vast number of pastebins. Again, in practice i have never run into the problem you describe, and i work with what is claimed by some to be the most unreadable mainstream language in existence.
Re: Obfuscating “Hello World” in Python
#20I still have problems fathoming how Python managed to get such a big mindshare within the developer community with its icky syntax and forced use of whitespace. What makes it good? I have looked into the alternatives and they all seem to be better.
- Fast CPU performance. The PyPy implementation in my tests (JSON processing) was faster than Go and CPython (module used was a C library) - Compiles to standalone binaries, C++ using Nuitka and other methods such as PyInstaller - Fast speed of development - Syntax: matter of personal taste. But overall Python is very terse - Large community, ~20 year vast resources for use and learning - IronPython for .Net librarie…
Like it or not, "Python" means CPython to most people, inducing most library authors, and you run into problems using PyPy if you assume it's "just Python", especially if you have come to rely on Python's easy interfacing with C.