Live data from Hacker News

Obfuscating “Hello World” in Python

benkurtovic.com

1–10 of 59 posts

Re: Obfuscating “Hello World” in Python

#2
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.

Re: Obfuscating “Hello World” in Python

#3
When I first saw the final code, I thought it unfathomable that I could resolve it down to "Hello World!" at any point in my lifetime. The following 20min provided an education into logic, programming, and Python that rivals 200 page reference books with clear explanations and the ideal amount of build up for each step. Thanks Ben for the post!

Re: Obfuscating “Hello World” in Python

#4

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.

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 provide different sets of third-party libraries.

Python's main advantages over other dynamic languages are as such:

- it traded expressivity for simplicity of syntax and as such is easy to master

- out of all the dynamic languages (other than R) it is best suited for numerical calculation

Re: Obfuscating “Hello World” in Python

#5

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.

I don't think python's syntax is icky at all and I hope you're not judging it by the looks of an obfuscation challenge.

Re: Obfuscating “Hello World” in Python

#6
post #4

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.

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.

Re: Obfuscating “Hello World” in Python

#7

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.

It has a very feature rich library. You can build relatively big applications with lots of features in a very short time.

Re: Obfuscating “Hello World” in Python

#9

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 closely after that.

Re: Obfuscating “Hello World” in Python

#10

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.

I use it (full-time for 8 years) because of the syntax and the forced use of white space. The language encourages people to write better and more maintainable code.

Out of interest, what language are you using that you prefer the syntax of?

Python is notoriously similar to pseudocode, and I can't think of a mainstream language (other than Ruby) that even seems to care about syntax.

Post reply on HN