3 ms·
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 poi
by tail_exchange 3y ago
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.