Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #31143

Re: ensuring unreachability

From Martin Gregorie <martin@address-in-sig.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: ensuring unreachability
Date 2015-02-18 00:59 +0000
Organization A noiseless patient Spider
Message-ID <mc0o4m$ouh$2@dont-email.me> (permalink)
References <slrnme63vm.uoi.avl@login.logic.tuwien.ac.at> <statement-20150217115740@ram.dialup.fu-berlin.de>

Show all headers | View raw


On Tue, 17 Feb 2015 10:58:26 +0000, Stefan Ram wrote:

>   You all know what I would do: Rewrite the whole thing, so that every
>   block has a single exit, which is a the end. Then, divide into several
>   smaller methods.
>
Agreed. A nice compact switch statement, where each case executes a very 
small number of methods, preferably one, is much more readable if the 
methods are properly named and they are organised so their exit 
conditions can be checked by common code that follows the switch 
statement. I think this type of structure is worthwhile even if many of 
the called methods are not used anywhere else.


-- 
martin@   | Martin Gregorie
gregorie. | Essex, UK
org       |

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

ensuring unreachability Andreas Leitgeb <avl@auth.logic.tuwien.ac.at> - 2015-02-17 09:54 +0000
  Re: ensuring unreachability Eric Sosman <esosman@comcast-dot-net.invalid> - 2015-02-17 08:23 -0500
  Re: ensuring unreachability Leif Roar Moldskred <leifm@huldreskog.localdomain> - 2015-02-17 13:54 -0600
  Re: ensuring unreachability Eric Sosman <esosman@comcast-dot-net.invalid> - 2015-02-17 15:51 -0500
    Re: ensuring unreachability Andreas Leitgeb <avl@auth.logic.tuwien.ac.at> - 2015-02-18 00:40 +0000
      Re: ensuring unreachability Eric Sosman <esosman@comcast-dot-net.invalid> - 2015-02-18 08:49 -0500
        Re: ensuring unreachability Jukka Lahtinen <jtfjdehf@hotmail.com.invalid> - 2015-02-18 16:40 +0200
          Re: ensuring unreachability Eric Sosman <esosman@comcast-dot-net.invalid> - 2015-02-18 10:16 -0500
            Re: ensuring unreachability Jerry Stuckle <jstucklex@attglobal.net> - 2015-02-18 11:02 -0500
              Re: ensuring unreachability Robbie Brown <rob@example.com> - 2015-02-19 09:48 +0000
                Re: ensuring unreachability Gene Wirchenko <genew@telus.net> - 2015-02-20 09:39 -0800
              Re: ensuring unreachability Robbie Brown <rob@example.com> - 2015-02-19 09:50 +0000
              Re: ensuring unreachability v_borchert@despammed.com (Volker Borchert) - 2015-02-19 18:20 +0000
                Re: ensuring unreachability Jerry Stuckle <jstucklex@attglobal.net> - 2015-02-19 15:24 -0500
        Re: ensuring unreachability Andreas Leitgeb <avl@auth.logic.tuwien.ac.at> - 2015-02-19 01:28 +0000
  Re: ensuring unreachability Arne Vajhøj <arne@vajhoej.dk> - 2015-02-17 18:49 -0500
  Re: ensuring unreachability Martin Gregorie <martin@address-in-sig.invalid> - 2015-02-18 00:59 +0000

csiph-web