News for hackers. Stuff that matters.
Re:Python-Dev: Adding braces to __future__ by BerislavLopac on Monday January 02, 2012 @10:35AM (#3416170)
"What Python needs is an alternative to WSB and can stay Python by still offering WSB to all those who happen to like it."

And that's an argument? Why not include static typing, or single inheritance, GOTO while we're at it? I'm sure there are those who happen to like them.

Well if anything, this is one of the most vocative trolls I have ever read. :)

Re:Python-Dev: Adding braces to __future__ by exDM69 on Monday January 02, 2012 @10:49AM (#3416222)
>> And that's an argument? Why not include static typing, or single inheritance, GOTO while we're at it? I'm sure there are those who happen to like them.

Why is static typing in that list? Unlike single inheritance or GOTO's, static typing is a good thing. Dynamic typing is often used in interpreted languages because once you're writing an interpreter, there's going to be a massive performance hit anyway and dynamic typing won't make it a lot worse. Dynamic typing makes compiling efficient code very difficult.

Of course, a good static typing programming language should have at least some kind of type inference mechanism to allow the programmer to leave out explicit type declarations when a compile can infer them from the program source code.

Boo is a statically typed, type-inferring language for the CLR that has a Python-like syntax. It seems pretty nice, I've written a few toy projects with it.

Re:Python-Dev: Adding braces to __future__ by obtu on Monday January 02, 2012 @11:23AM (#3416347)
There's an argument to be made: one can't be all things to everyone. Python is a dynamic language, and adding optional features to make it work differently won't bring the benefits of either way of making things work consistently. Two syntaxes like that troll poster proposed would increase cognitive load, static typing mixed with dynamic typing would add some boilerplate for no real safety.
Re:Python-Dev: Adding braces to __future__ by exDM69 on Monday January 02, 2012 @11:40AM (#3416400)
Simplicity can be a benefit, but there are examples of languages that are either dynamically typed with optional static type annotations and languages that are statically typed but have a special dynamic duck type (that may use something like the invokedynamic opcode in the java bytecode), so why not Python?

Examples: static typing with optional duck types: Boo. dynamic typing with optional type annotations: many Lisps, e.g. Racket.

Re:Python-Dev: Adding braces to __future__ by obtu on Monday January 02, 2012 @11:54AM (#3416454)
Python can't become static with optional invokedynamic; static typing has to be built from the start. For example, the % operator can't be typed. Optional typing I've seen in Perl, and again it seems like boilerplate for no benefit.
Re:Python-Dev: Adding braces to __future__ by exDM69 on Monday January 02, 2012 @02:47PM (#3417054)
I was thinking more about having optional type annotations to facilitate better optimization in (JIT) compiler based implementations of Python, like PyPy, Jython, IronPython or others. Type annotations may also be useful for doing some static sanity checking.
Re:Python-Dev: Adding braces to __future__ by chromatic on Monday January 02, 2012 @01:20PM (#3416765)
Optional typing I've seen in Perl, and again it seems like boilerplate for no benefit.

One benefit is additional optimizations. Many good Lisp implementations take advantage of this.

Re:Python-Dev: Adding braces to __future__ by aGHz on Monday January 02, 2012 @10:42AM (#3416201)
No joke! This is what happens when trolls are classically trained.