[M3devel] saving indentation?

Dragiša Durić dragisha at m3w.org
Sun Sep 2 09:22:32 CEST 2012


Excellent post. I may use it to explain to friends Why Modula-3 :).

Point remains, Modula-3 does not need any of this sugar, because it has TRY-FINALLY.

If you really have complex code in need of continue, why don't add inner loop where EXIT will, in fact, just finish inner body and return immediately to outer body (your loop you wish to continue)? It surely is extra level of indentation, but is better than deep IF.

dd
--
Divided by a common language

Dragiša Durić
dragisha at m3w.org




On Sep 2, 2012, at 7:27 AM, Jay K wrote:

> goto is good.
> At least if you don't have try/finally and/or destructors.
>   Otherwise goto is indeed rarely needed.
> 
> Multiple returns per function are bad, if you don't have
> try/finally and/or destructors -- otherwise multiple returns aren't needed.
> 
> 
> Modula-3 does have "exit" which is like "break".
> But it is lacking "cotinue".

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20120902/0450a03e/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 495 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20120902/0450a03e/attachment-0002.sig>


More information about the M3devel mailing list