3 ms·
Yeah that would work better than using nil. And it would make it clear that it was being initialised to whatever the default value for that type is. Though, of
by marcus_holmes 5y ago
Yeah that would work better than using nil. And it would make it clear that it was being initialised to whatever the default value for that type is.
Though, of course, most coders would leave out the second step here since the compiler initialises all variables with their type's default value ;)
- simiones 5y agoSure :), the really nice example would be return default, default, default, err