News for hackers. Stuff that matters.
Re:Ask HN: What should be added to the syntax of Python and ... by backslash_16 on Monday July 31, 2023 @08:18PM (#36950707)
I would love separate variable initialization vs assignment. I know that ship has sailed.

It's interesting, I never cared about that until I did "Crafting Interpreters" and realized how separating those two actions helps clarify scopes.

Being realistic I know it's too large of a breaking change and will never land in the language but I can dream right?

Re:Ask HN: What should be added to the syntax of Python and ... by kazinator on Monday July 31, 2023 @10:09PM (#36951502)

  s/separating/not stupidly conflating/
In computer science, binding a variable and assignment are not only separated, but by an ideological chasm.
Re:Ask HN: What should be added to the syntax of Python and ... by vhcr on Monday July 31, 2023 @11:13PM (#36951881)
I don't see it being such a bad thing, it ensures variables always have a defined value.