News for hackers. Stuff that matters.
Re:What I'd like to see in Go 2.0 by amw-zero on Friday February 04, 2022 @10:04AM (#30207598)
Depending on code review instead of a static type system does not scale. Look at all of the memory safety security vulnerabilities that are solved by "simply making sure to manage memory correctly."

Also:

  variableDefinedInAFarAwayModule := 17

  ...

  TestSomething(variableDefinedInAFarAwayModule)
  
It's not always as clear as a constant value being passed to an incorrect type.
Re:What I'd like to see in Go 2.0 by donatj on Friday February 04, 2022 @10:29AM (#30208011)
I don't understand your example here, that's not going to compile.

variableDefinedInAFarAwayModule is definitionally type int and will not be cast. It is also unpublished, so you couldn't be using it for a faraway module?

Your 17 in the previous example has it's typed determined at compile time which is why it can be a problem.

see: https://go.dev/play/p/jEdAhKDeLy6

Re:What I'd like to see in Go 2.0 by amw-zero on Friday February 04, 2022 @10:42AM (#30208214)
Ah thank you. That's slightly better then.
Re:What I'd like to see in Go 2.0 by EdiX on Friday February 04, 2022 @03:25PM (#30212565)
This will not compile because the type of the variable is int not Test.