Live data from Hacker News

What’s New in Python 3.0

docs.python.org

11–20 of 43 posts

Re: What’s New in Python 3.0

#11
post #9
post #8

Earlier quoted context omitted.

You can always consider print as low-level feature and wrap the whole thing in a fancy stream. class err_class: def __lshift__(self,other): print(other) return self err = err_class() err

Of course I can do it, then why isn't it done already in the language? Printing is something we do all the time in server applications, and that means, the printing facility in the language should be polished to death.

That's because really cool languages provide you with the power to build what you want, not the ton's of built-in fancy features.

Re: What’s New in Python 3.0

#12
post #11
post #9

Earlier quoted context omitted.

Of course I can do it, then why isn't it done already in the language? Printing is something we do all the time in server applications, and that means, the printing facility in the language should be polished to death.

That's because really cool languages provide you with the power to build what you want, not the ton's of built-in fancy features.

There is one advantage in having necessary stuff built into the language: others can understand your code quickly.

As for printing, it is so basic and simple, if implemented right of course, that I wouldn't call it "tons of fancy features".

Re: What’s New in Python 3.0

#13
post #7
post #5

Earlier quoted context omitted.

I never liked that either, but the new version is physically longer and requires more typing. Moreover, I couldn't find any change in 3.0 that results in less typing. I might have missed something of course, but this announcement doesn't seem to be something to be excited about. I was waiting, for example, lambdas to be allowed to have compound statements. Python, a nice language otherwise, could have been improved i…

from pep 3099: At one point lambda was slated for removal in Python 3000. Unfortunately no one was able to come up with a better way of providing anonymous functions. And so lambda is here to stay. But it is here to stay as-is. Adding support for statements is a non-starter. It would require allowing multi-line lambda expressions which would mean a multi-line expression could suddenly exist. That would allow for mult…

I understand there are syntactic obstacles, in fact I've been following these discussions, but... I'm very sorry, who cares?

Re: What’s New in Python 3.0

#15
post #3

print("fatal error", file=sys.stderr) So, Python has become even less succinct for the sake of "consistency". I think there is only one flawless, absolutely consistent machine, and that's Turing machine. The urge for consistency and simplification (I mean, if you are consistent in your aspiration for consistency) inevitably leads to reinventing the Turing machine in its purity. It's OK, except for some reason nobody…

Turing's machines are clunky. Do lambda calculus or grammars instead.

Re: What’s New in Python 3.0

#16

I really wish they had added real lambdas. Don't get me wrong, these changes seem good. But every time I hear about a new Python release I keep hoping that I'll see they've finally reversed their policy about lambdas and made a real one instead of the compromise they have right now.

You should be yearning for proper tail recursion instead.

Re: What’s New in Python 3.0

#17
Instead of

print("string")

I would have liked to see

fn op1 op2

to be the standard function invocation - like in Haskell. (I know that would have wreaked havoc with the rest of Python's syntax.)

Re: What’s New in Python 3.0

#18
post #15
post #3

print("fatal error", file=sys.stderr) So, Python has become even less succinct for the sake of "consistency". I think there is only one flawless, absolutely consistent machine, and that's Turing machine. The urge for consistency and simplification (I mean, if you are consistent in your aspiration for consistency) inevitably leads to reinventing the Turing machine in its purity. It's OK, except for some reason nobody…

Turing's machines are clunky. Do lambda calculus or grammars instead.

Lambda calculus is beautiful, but modern computers are not lambda machines.

Re: What’s New in Python 3.0

#20
post #18
post #15

Earlier quoted context omitted.

Turing's machines are clunky. Do lambda calculus or grammars instead.

Lambda calculus is beautiful, but modern computers are not lambda machines.

Is there a problem which can be solved in Lambda Calculus that cannot be solved in a Turing Machine?
Post reply on HN