top | item 33234484

(no title)

mshenfield | 3 years ago

Also a good reminder why exceptions and optionals exist. Bonkers that "I didn't get a response" defaults to 0.

discuss

order

a_shovel|3 years ago

It's not that "no response" defaults to 0, it's that in Factorio's circuit network, "no signal" and "signal with a value of 0" are exactly synonymous.

1-more|3 years ago

One thing I hated about working with Go. POSTed JSON bodies missing a field could not be distinguished from those where that field pointed was present and pointed to the empty value for that (an empty array or string or something). This may be entirely work-around-able and simply a failure of how that job worked, but it was a whole thing.

Laremere|3 years ago

In this case, instead of, say, an int, you could have the field be a pointer to an int.