Re:A function decorator that rewrites the bytecode to enable...
by withinboredom on Tuesday September 21, 2021 @05:35AM
(#28603372)
An if-statement is essentially sugar for conditional jump which is sugar for compare then jump. Goto is a jump. Itβs all sugar.
For example there's no ternary operator. Instead you'll have to write out a few lines of if/else. There's no function overloading or operator overloading, no built in min/max, and currently no generics (though they're being added).
They definitely try to keep the number of keywords down to a minimum compared to languages like Swift where you could write the same business logic in fewer lines using stuff like try, guard, !, and ?.