DEV Community

Discussion on: You don't need null

 
martinpham profile image
Martin Pham

Payloads are smaller by omitting some characters, good.
But if it causes confusion between null (value is set as no value) and undefined (value is not set), I wouldn’t take it as a good thing.

 
loucyx profile image
Lou Cyx

"Absence and null are different things" ... how? The size of the payload doesn't only affect the request, also the parsing. You're literally loading something trough the wire and in memory that you could omit, just to use null X_X

Some comments have been hidden by the post's author - find out more