Email or username:

Password:

Forgot your password?
Johannes Ernst

Python just cost me half an hour. The problem: a comma instead of a period.

Runtime and two linters said everything was fine. Except it wasn't.

Soapbox: Programming languages should not have syntaxes where something like this is possible. Compact syntax is all nice and dandy, but there needs to be enough redundancy that things like this are easily caught. Otherwise we'd all still write software in hex.

7 comments
maegul

@J12t

yea, there's probably an argument that the comma is an overpowered part of the syntax given how small and similar to a period it is.

It's probably the buckling point for all the strains that the whitespace-as-syntax design creates.

Johannes Ernst

@maegul That, and the overload of () as precedence and tuple. Just got myself a tuple of two strings instead of a multi-line string ...

maegul

@J12t

yea that's part of it, and all descending from the whitespace-as-syntax.

My hot take would be that parens for literals (tuple or generator) should not be permitted as precedence/scope is too fundamental.

If having `[]` and `{}` for literals feels inconsistent, then remove them too. tuple(), list(), set() and dict() are all right there and pretty pythonic IMO.

If course, it's too late. But that comma being a little Paul Atreides of your code base is PITA.

der.hans

@J12t wait until you find out python also depends on invisible horizontal spacing characters!!!

:)

Johannes Ernst

@lufthans I believe there is a law in software that says only the broken designs and the spaghetti code gains widespread adoption, while the nicely designed and clean systems barely have any users.

Get me a different planet, please.

der.hans

@J12t Lccher! Delicious spaghetti code!

Kancept

@J12t I posit that going back to hex or asm will bring some better quality software about

Go Up