Live data from Hacker News

No Python

bitcheese.net

1–10 of 10 posts

Re: No Python

#2
The posts starts by making the point that Python is not a calculator, and goes downhill from there, vaguely circling around the point that Python is not Ruby.

Thanks for trolling. Happy Sunday!

Re: No Python

#4
Haven’t I been using C++ for ages and now is blinded with metaprogramming & PR?

English must not be the first language of the author. Either that or they are ignorant.

Not sure which I should assume, but I'm willing to give them the benefit of doubt. ;)

Re: No Python

#5
post #2

The posts starts by making the point that Python is not a calculator, and goes downhill from there, vaguely circling around the point that Python is not Ruby. Thanks for trolling. Happy Sunday!

True that, but I thought I'd also note that floats are represented as compactly as possible starting in 3.1.1.

> Issue #1580: On most platforms, use a 'short' float repr: for a finite float x, repr(x) now outputs a string based on the shortest sequence of decimal digits that rounds to x. Previous behaviour was to output 17 significant digits and then strip trailing zeros. Another minor difference is that the new repr switches to exponential notation at 1e16 instead of the previous 1e17; this avoids misleading output in some cases.

Re: No Python

#6
I'm not even a big Python fan. I don't hate it. It's just not my favourite... and every language has it's warts.

I can understand the author not LIKING certain ways that Python works but I tire of philosophical differences in language design decisions being branded wrong.

I can accept that the author doesn't like a bunch of things but this annoys me:

  36 chars against 18.
Comparing languages by character count is fruitless. It's like comparing pieces of music by the number of notes or food by the number of ingredients. You have to decide where the important numeric barrier is, which is pretty arbitrary. For me, programming is more thinking that typing. It just seems like a ridiculous comparison.

Re: No Python

#7

The delivery's a bit harsh but they're making very good points there. I especially find the self always as a first argument a majoy WTF

No he isn't. It's at best bikeshedding and at worst trolling (and self falls into the first category).

Re: No Python

#8

The delivery's a bit harsh but they're making very good points there. I especially find the self always as a first argument a majoy WTF

I'll bite... Could you list the "good points"? Did he really make any?

First he insults people using (for example) wicd. No - I didn't even notice it was written in python until I read this article. I don't think it's slow either.

Then he says "crashes wherever it encounters broken Unicode". That's not true - throwing exception is not a crash. And if a bytestream is really broken unicode, then what else can be done?

Numbers formating / representation is something that shouldn't surprise any programmer. That's the way it works - whether it's the preferred way or not is a different thing. I like to see when a number is a proper number. Is this in ruby any more correct than python's way?

    irb(main):001:0> 1.1000000000000001
    => 1.1
"Python treats objects as hashes (dictionaries), but this approach is flawed. You still need those ‘blessed’ methods, and python surrounds them with double underscores as distinction measure." Here I'm not even sure what is he on about... The distinction is clear - internal stuff has underscores, you usually don't use the underscore'd stuff. You don't touch `__class__` for example - you use isinstance() and others.

Self may be verbose, but it's not that bad. There's at least one reason to use other name - in metaclasses, it's not `self`, but rather `klass` since it's not an instance.

The constructor example is completely broken. First, why does he want to return 0 from initialiser? Second, who cares if it's 3X or 1X characters... You only write the initialiser if it does anything, so it's going to have 80+ characters typically.

"Python uses and/or encourages no naming convention" - I guess PEP 8 was too long to read.

GIL "problem" - learn to use multiprocess. Yes - the threading itself may be slow, but if you need that much speed, why are you writing in python? Just port it to some static language after you've done prototyping.

"Do you see segfaults often in dynamic languages? Well in python you do. Also, its libraries require compilation." With no real examples. Also no - I haven't seen segfaults in python so far. Also no - libraries don't require compilation - they're just dumped to disk in preprocessed form when their loaded the first time, so that they're loaded faster later on. It's mainly done, so that python is faster, which he wants in the other point...

Language comparisons miss any rational examples, so I won't even comment on them.

He simply doesn't like python. Is that interesting news?

Re: No Python

#9
"Syntactic sugar for dictionaries". I don't know if it is good or bad or if that's very OO, but that's the feeling I get when I occasionally code Python.

Re: No Python

#10
I just want to point out that his example of Python isn't even valid syntax:

    def __init__(self)
	return 0

 1. There's no colon to begin the function.
 2. Initializers can't return ints.  They can't return anything other than None.