Proposal: replace ๐ฅ with ๐ (was: with ๐ง)
meithecatte opened this issue ยท comments
โญ๏ธ Proposed change
Replace the emoji used for error handling with ๐ง.
๐ค Rationale
As far as I can see, ๐ฅ has no intuitive connection to error handling. On the other hand, ๐ง is already associated with errors, and can be used in this place without grammar ambiguity.
Moreover, handling the error might make the code take a detour or cut the execution short, while roadworks might make you take a detour or cut your roadtrip short.
๐บExample
๐ง a ๐คฆโโ๏ธ๐๐โ๏ธ ๐
๐ a โ๏ธ
๐
๐
error ๐
๐ ๐ช๐คAn error occured: ๐ค ๐ฌerrorโ๏ธ ๐ช โ๏ธ
๐
Replacing ๐ฅ is certainly a good idea, but I think ๐ง is not the ideal replacement. ๐ง is used as a "identifier with special" (or so) already, using it as an error handler would overload it with even more special meaning. Moreover, ๐ง can occur quite frequently and seem redundant and I think that error handling should be obvious.
Hmm, maybe syntax similar to optionals could work, then?
โช๐คฆโโ๏ธ๐๐โ๏ธโก a ๐
๐ a โ๏ธ
๐
๐
error ๐
๐ ๐ช๐คAn error occured: ๐ค ๐ฌerrorโ๏ธ ๐ช โ๏ธ
๐
Alternatively, how about ๐ฅ?
Maybe a policeman? ๐ฎโโ๏ธ๐ฎโโ๏ธ Police should provide safety and help with detours, as you put it. Or a police car ๐?
Although reusing optional assignment syntax would be nice, itโs counterintuitive if the worse statement suddenly defines a variable.
Or even better ๐! That would go well together with the other flow control emojis and could be read as โif everythingโs ok go into this blockโ.
๐ makes perfect sense for this.