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
-
kosio-t23917yBoth have the sugar as array of little sugar crystals.
The diet one has assigned null to the array.
The zero one has set array’s size to 0.
In conclusion the diet coke is more memory effective. -
If you add sugar to the one with zero sugar, it has one sugar.
If you add sugar to the one with no sugar, the can melts. -
@just-basic-user But coke zero is type safe for functions which don't accept optionals. And how to implement pepsi max? sum([-∞..∞])?
I feel like this is going to be the new tabs vs spaces. -
kosio-t23917y@bittersweet Why can’t the sugar be optional array like “var sugar: [Sugarcrystal]? = [Sugarcrystal]()”
Explaining the difference between these two using Null && 0
undefined