Live data from Hacker News

I don't like Python. Does that make me a bad person?

news.ycombinator.com

221–230 of 231 posts

Re: I don't like Python. Does that make me a bad person?

#221
post #167

Earlier quoted context omitted.

Agreed. And interesting you said C and Python. A few years ago I was thinking about what would be the minimum set of languages that would be good to know in order to be able to do almost anything you wanted, and do it well, and to always be employable. I ruled out 1 language alone because of the C phenomenon: there's a whole class of software where today C is the best choice, and a whole different set where C is a ba…

No, Google picked C++, not C. Very different philosophy!

Btw I considered C++ for the C slot. But decided if I really wanted 1st class OO support in a language that Java or Python could do that acceptably, and it wasn't worth the price of dealing with what I felt were C++'s design imperfections. So it fell back to:

* C for (somewhat) bare metal programming (OS, embedded)

* Java for high-level with rubber edges and safety wheels, esp huge codebases in enterprise IT shops with Joe Blub coders

* Python for high-level agile w/solo or small elite teams (calling out to C bits where beneficial)

Re: I don't like Python. Does that make me a bad person?

#222
post #4

Yesterday there was an interesting link on HN comparing NLP in Python vs. other languages: http://nltk.googlecode.com/svn/trunk/doc/howto/nlp-python.ht... . I think this article shows the clearness of the Python language - - and this clearness and simplicity is the reason why I love to code in Python.

Why doesn't anyone ever mention my favorite language, Tcl? foreach line [read stdin] { foreach word [split $line] { if [string match *ing $word] { puts $word } } }

Your code sample isn't quite right.

[read stdin] returns a string (not a list of strings), which is parsed as a list when you try to loop over it. The parsing breaks the string into a list of words, so the second loop is redundant. The parsing could fail if the input file isn't valid list syntax (unmatching {}'s). [split _] makes it safe.

    foreach word [split [read stdin]] {
        if [string match *ing $word] { puts $word }}
I love Tcl too! Tcl is a scripting language for C, Python is less-powerful version of Lisp.

Re: I don't like Python. Does that make me a bad person?

#223
post #148

I am a day-to-day C programmer. I am surprised to hear Python did not fit well after C for you. In my view, Python is the like the easy scripting version of C. I first learned Tcl/Tk, then Perl, then looked at bash scripting (my god, horrible) and seen that the earlier three has some obscure syntax with some special meanings of $'s and @'s and hyphenated flags everywhere with no resemblance to C. Then looking into py…

What do you have against bourne shell scripting? I thinks it's probably the most under-rated language/programming paradigm I know. I really don't understand all the hate. Also, what didn't you like about Tcl? I find it much more in-line with the C world-view than python is; It's C-interface is a lot cleaner than Pythons as well.

My language-choice algorithm is:

sh + unix DSLs -> Tcl/Tcl+C -> SML/Haskell/Scheme -> C -> *

Where '*' is whatever language has a library I need, or a language that I'm required to use.

Re: I don't like Python. Does that make me a bad person?

#224

Earlier quoted context omitted.

""" Java is a bureaucratic language. You have to cross your t's dot your i's, fill out your requests in triplicate at the FactoryFactoryFactory to get the objectOfYourDesire. """ This is such an absolutely fantastic way of succinctly describing why I dislike Java so much. Bureaucratic! Absolutely fantastic post, get this on a blog somewhere. I seriously wish I could upvote you more.

Much of Java's complexity is cultural and not imposed. Take the Java web framework, Play, as an example. http://www.playframework.org/

That's true, but the flip side is that the language is tailored to that culture. They love it and it loves them. The culture has grown around Java more than any other language because of Java's features. It's statically typed, but its typing isn't very powerful. It's dynamic, but makes it hard to write the sort of dynamic programs you'd write in Python or Smalltalk. It has methods but no functions. It has anonymous classes but no simple closures.

All of Java's features conspire to create a language that's pretty verbose and doesn't do a lot to make things easier for you (aside from simple object orientation). If you like spelling everything out in excruciating detail, that's good. If not, the language doesn't want to twist your arm, but it's certainly not going to do anything to help you.

Re: I don't like Python. Does that make me a bad person?

#225
post #76

Earlier quoted context omitted.

Here's a translation of that to Clojure, since I'm learning that now: (use 'clojure.set) (reverse (sort (map int (intersection (set "letters in this sentence") (set "and this one"))))) Edit: Take two... (use 'clojure.set) (->> (intersection (set "letters in this sentence") (set "and this one")) (map int) sort reverse) (experienced lispers, feel free to make this more idiomatic)

I find the python code much more readable.

IMO, both suck at readability, since you have to read inner expressions first. An example with a "pipe" would be clearer.

Re: I don't like Python. Does that make me a bad person?

#226
post #4

Yesterday there was an interesting link on HN comparing NLP in Python vs. other languages: http://nltk.googlecode.com/svn/trunk/doc/howto/nlp-python.ht... . I think this article shows the clearness of the Python language - - and this clearness and simplicity is the reason why I love to code in Python.

Python for me is the language closest to pseudocode. There are no decorations and few gimmicks. You simply write your ideas down into code.

> Python for me is the language closest to pseudocode.

Python for me is the imperative language (with some functional features) closest to pseudocode.

Re: I don't like Python. Does that make me a bad person?

#227

A lot of us don't like Python. It's a language with a mediocre design, a somewhat frustrating syntax, and a stubborn refusal to commit to such essentials as real closures and lambdas. It's basically a language written by a group of people who don't trust you (as a Python user) to be knowledgable and educated. Decisions have been made based on the assumption that you are bad at your job. Now, everyone seems to comfort…

> It's a language with a mediocre design, a somewhat frustrating syntax, and a stubborn refusal to commit to such essentials as real closures and lambdas.

I agree about closures, but why lambdas would be so much better than named functions (already available)? I think named functions help code readability, which is among Python's top goals.

Re: I don't like Python. Does that make me a bad person?

#229
post #222

Earlier quoted context omitted.

Why doesn't anyone ever mention my favorite language, Tcl? foreach line [read stdin] { foreach word [split $line] { if [string match *ing $word] { puts $word } } }

Your code sample isn't quite right. [read stdin] returns a string (not a list of strings), which is parsed as a list when you try to loop over it. The parsing breaks the string into a list of words, so the second loop is redundant. The parsing could fail if the input file isn't valid list syntax (unmatching {}'s). [split _] makes it safe. foreach word [split [read stdin]] { if [string match *ing $word] { puts $word }…

Yes you're right hehe. less powerful version of Lisp? that's weird but oh well ..

Re: I don't like Python. Does that make me a bad person?

#230
post #227

A lot of us don't like Python. It's a language with a mediocre design, a somewhat frustrating syntax, and a stubborn refusal to commit to such essentials as real closures and lambdas. It's basically a language written by a group of people who don't trust you (as a Python user) to be knowledgable and educated. Decisions have been made based on the assumption that you are bad at your job. Now, everyone seems to comfort…

> It's a language with a mediocre design, a somewhat frustrating syntax, and a stubborn refusal to commit to such essentials as real closures and lambdas. I agree about closures, but why lambdas would be so much better than named functions (already available)? I think named functions help code readability, which is among Python's top goals.

> I agree about closures, but why lambdas would be so much better than named functions (already available)?

Because sometimes you want to conditionally create functions on the fly. Named functions are a very awkward way to do this.

It is unfortunate that we even have to have this argument. Anyone with significant experience in functional programming can tell you how useful unnamed functions are.

And it's important to realize they are not necessarily anonymous in local scope. They're anonymous in the global scope.

> I think named functions help code readability, which is among Python's top goals.

Anonymous Lambdas need not be a detriment to readability. Why do you think it would be otherwise?

Post reply on HN