[Oberon] Multiple RETURN in a procedure
Skulski, Wojciech
skulski at pas.rochester.edu
Sun Oct 23 18:57:51 CEST 2022
Joerg:
> PROCEDURE min (x,y: INTEGER) : INTEGER;
> BEGIN IF x < y THEN RETURN (x) ELSE RETURN (y) END END min;
> Personally, I find this a little less cluttered
> PROCEDURE min(min,x: INTEGER): INTEGER;
> BEGIN IF x < min THEN min := x END
> RETURN min END min;
I personally find it more cluttered.
I asked for overwhelming arguments. These could be significantly smaller code, faster execution, or faster compilation. I stress the word "significantly". Take faster compilation as an example. If compiling the Oberon System took 10 days, then cutting off one day would be significant. If the compilation takes 10 seconds, then cutting one second is hardly significant.
So what are those significant gains, as opposed to personal views what is cluttered and what is not?
Wojtak
More information about the Oberon
mailing list