News for hackers. Stuff that matters.
Re:Backward Compatibility, Go 1.21, and Go 2 by meepmorp on Monday August 14, 2023 @01:38PM (#37123988)
I have named a function 'foo', in current version of language. A future change makes 'foo' a keyword. My code was broken by adding a keyword.
Re:Backward Compatibility, Go 1.21, and Go 2 by earthboundkid on Monday August 14, 2023 @01:55PM (#37124236)
This is not theoretical: Python broke a lot of async packages when they made “async” a keyword!
Re:Backward Compatibility, Go 1.21, and Go 2 by crickey on Monday August 14, 2023 @06:22PM (#37127522)
I guess, some languages get around this by having a destinction between functions and keyword functions not having the () braces in the syntax. But really if ur defning functions as keywords u should just put it in the standard library