My take on the discussion to introduce an ?
operator in Go π No. For so many reasons.
@prologic@twtxt.net I donβt like it either. Too much magic, that only works in certain cases.
@lyse@lyse.isobeef.org one time i saw that operator when working with ruby on rails and i was so confused by it that i got stuck on the same code involving it for 9 hours straight
@kat@yarn.girlonthemoon.xyz You mean the ?
as suffix for boolean returning functions or as ternary operator (condition ? true_value : false_value
)?
Interestingly, I just had to look up the first case. I was under the wrong impression that the question mark at the end would be some shortcut for chained function or method calls that handles nil
return values in a graceful way without actually dereferencing and thus crashing. I probably never wrote more than 30Β lines of Ruby in my entire life. Must have been some other language.
@lyse@lyse.isobeef.org Ita a terrible operator that makes code hard
Yo read as @kat@yarn.girlonthemoon.xyz difhtidu points out π