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.
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?