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


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

Re: Blocks for scope control

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!.POSTED!not-for-mail
From Lew <noone@lewscanon.com>
Newsgroups comp.lang.java.programmer
Subject Re: Blocks for scope control
Date Sun, 15 Jan 2012 15:45:31 -0800
Organization albasani.net
Lines 29
Message-ID <jevoes$qru$1@news.albasani.net> (permalink)
References <dBCQq.122$d%2.16@newsfe07.iad> <jev7op$j4k$1@news.albasani.net> <IRHQq.2650$2C.1194@newsfe20.iad>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 7bit
X-Trace news.albasani.net T9dHoiBSNyRtFCj5Yp3kDSBVPxBzIdoBytOCfgWdNTkkNp4dUNN8rnw/+WJZ2Wb040M1xyaVLtCYMdOrVd4UMJIdR4m5PKoM7LIa+h/Cs5dURwjCdQ5uv/uxzryDRumC
NNTP-Posting-Date Sun, 15 Jan 2012 23:45:32 +0000 (UTC)
Injection-Info news.albasani.net; logging-data="4c8z1R3QyE2Enf6/wOQEhCIwXvwfcoCnPP0h0L9gOl5aKe+BM1f73QzobLfdLM1FdB5/UI43p3MBuJMHWK3Wysn0PgCO1fpZZ4apacSFj4G1T6xvEAbpXkp79FwM+aVG"; mail-complaints-to="abuse@albasani.net"
User-Agent Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111109 Thunderbird/3.1.16
In-Reply-To <IRHQq.2650$2C.1194@newsfe20.iad>
Cancel-Lock sha1:X+WOkyRXAoStiifUji270i9ARC0=
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:11369

Show key headers only | View raw


Arved Sandstrom wrote:
> Lew wrote:
>> There are many, many idioms in Java that are woefully underused.

Okay, not all that many, but some.

>> 'assert' is the prime example.  People don't understand it, even
>> excoriate it (strange as that seems), and it's been around about a
>> decade, since Java 1.4.  Lack of use does not equate to lack of value.
>>
> Quite apart from (lack of) understanding as to how to apply assertions
> effectively and correctly, I believe that there are other reasons why
> they are not more widely used. Some are good, some not so good, some are
> neutral.
>
> I'm with you on this one, though. I like assertions and use them.

I am curious as to the "good" reasons why they're not more widely used. I can 
think of none I'd categorize as "good".

There are good reasons not to use them in certain scenarios, e.g., they are 
not intended nor should be used for checking arguments to public methods, but 
that doesn't speak to why 'assert' isn't more widely used for the intended use 
cases.

-- 
Lew
Honi soit qui mal y pense.
http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg

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


Thread

Blocks for scope control Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-01-15 11:50 -0400
  Re: Blocks for scope control Robert Klemme <shortcutter@googlemail.com> - 2012-01-15 17:10 +0100
  Re: Blocks for scope control Robert Klemme <shortcutter@googlemail.com> - 2012-01-15 17:32 +0100
    Re: Blocks for scope control Lew <noone@lewscanon.com> - 2012-01-15 11:21 -0800
    Re: Blocks for scope control Robert Klemme <shortcutter@googlemail.com> - 2012-01-16 07:59 +0100
  Re: Blocks for scope control markspace <-@.> - 2012-01-15 09:57 -0800
    Re: Blocks for scope control Lew <noone@lewscanon.com> - 2012-01-15 11:28 -0800
  Re: Blocks for scope control Lew <noone@lewscanon.com> - 2012-01-15 11:00 -0800
    Re: Blocks for scope control Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-01-15 17:49 -0400
      Re: Blocks for scope control Lew <noone@lewscanon.com> - 2012-01-15 15:45 -0800
        Re: Blocks for scope control Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-01-19 21:54 -0400
          Re: Blocks for scope control Robert Klemme <shortcutter@googlemail.com> - 2012-01-20 08:41 +0100
            Re: Blocks for scope control Lew <noone@lewscanon.com> - 2012-01-20 15:24 -0800
            Re: Blocks for scope control Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-01-20 19:30 -0400
              Re: Blocks for scope control Lew <noone@lewscanon.com> - 2012-01-20 15:54 -0800
      Re: Blocks for scope control Robert Klemme <shortcutter@googlemail.com> - 2012-01-16 07:55 +0100
        Re: Blocks for scope control Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-01-19 21:16 -0400
          Re: Blocks for scope control Robert Klemme <shortcutter@googlemail.com> - 2012-01-21 13:25 +0100
            Re: Blocks for scope control Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-01-21 10:41 -0400
              Re: Blocks for scope control Robert Klemme <shortcutter@googlemail.com> - 2012-01-22 13:03 +0100
  Re: Blocks for scope control Roedy Green <see_website@mindprod.com.invalid> - 2012-01-16 06:09 -0800
    Re: Blocks for scope control Henk van Voorthuijsen <voorth@xs4all.nl> - 2012-01-16 07:03 -0800
  Re: Blocks for scope control Arne Vajhøj <arne@vajhoej.dk> - 2012-01-17 18:43 -0500
  Re: Blocks for scope control Lew <noone@lewscanon.com> - 2012-01-20 11:05 -0800
  Re: Blocks for scope control Gene Wirchenko <genew@ocis.net> - 2012-01-20 12:11 -0800
  Re: Blocks for scope control Arne Vajhøj <arne@vajhoej.dk> - 2012-02-06 21:24 -0500

csiph-web