Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
but... it is a Map.
scema is never nil, bc it was declared as a pointer to a new object. -
Doesn’t Go have a type system that lets you declare non-nullable variables so that the compiler can ensure that it won’t be nil?
Like in Rust, Swift and Kotlin? -
@Lensflare pointers can be nil, values not, in this case a pointer var is created and immediately filled with an empty object
-
@alexbrooklyn ok then it’s the same issue that C# has.
I find it pathetic that a modern language like Go repeats the same design mistakes as older languages instead of learning from them.
* Sigh * Found this in an open source project, time to make a PR that'll never get looked at. \
(first and last lines)
rant