News for hackers. Stuff that matters.
Re:What makes you enjoy Go lang? by Alifatisk on Tuesday April 25, 2023 @08:06AM (#35699320)
Thank you for this comprehensive list, this made me more excited about the language.

These were the highlights for me: - Simplicity - Typed - Go-routines - Single binaries (Cross-compilation is just an environment variable)

> - Nil pointers. It would be great if there was a way to ensure points will never be nil.

Like Dart sound null safety?

Re:What makes you enjoy Go lang? by tail_exchange on Tuesday April 25, 2023 @09:21AM (#35700074)
I never used Dart, but from the examples I saw online, seems to check out.

Go is more similar to languages like C, where you use a * to declare a type as a pointer. So an int is just a value in the stack and cannot be null, but an *int is a pointer to somewhere in memory and can be null. It would be lovely to have a third option in this list, something like *int for non-nullable pointers and *int? for nullable pointers.