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


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

Re: Why “new”?

X-FeedAbuse http://nntpfeed.proxad.net/abuse.pl feeded by 88.191.16.109
Path csiph.com!eeepc.pasdenom.info!news.pasdenom.info!news.dougwise.org!nntpfeed.proxad.net!nospam.fr.eu.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!74.125.46.80.MISMATCH!postnews.google.com!news1.google.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post01.iad.highwinds-media.com!newsfe06.iad.POSTED!8ad76e89!not-for-mail
From Arved Sandstrom <asandstrom3minus1@eastlink.ca>
User-Agent Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7
MIME-Version 1.0
Newsgroups comp.lang.java.programmer
Subject Re: Why “new”?
References <iii71v$3ud$1@lust.ihug.co.nz> <iiikhp$7s4$1@news.eternal-september.org> <4d4cd875@news.x-privat.org> <4d4d617f$0$23763$14726298@news.sunsite.dk> <kLd3p.62928$ZS4.61193@newsfe07.iad> <4d4e3087@news.x-privat.org>
In-Reply-To <4d4e3087@news.x-privat.org>
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 7bit
Lines 35
Message-ID <C4x3p.72003$Y8.16393@newsfe06.iad> (permalink)
X-Complaints-To abuse@newsgroups-download.com
NNTP-Posting-Date Sun, 06 Feb 2011 13:09:54 UTC
Organization Public Usenet Newsgroup Access
Date Sun, 06 Feb 2011 09:09:54 -0400
Xref csiph.com comp.lang.java.programmer:26140

Show key headers only | View raw


On 11-02-06 01:24 AM, Ken Wesson wrote:
> On Sat, 05 Feb 2011 11:10:07 -0400, Arved Sandstrom wrote:
>
[ SNIP ]

>> And I wouldn't mind seeing proper bounds checking in that little code
>> snippet from Ken.
>
> That code snippet inherits Java's bounds checking, since it's Clojure
> code. :) So it won't crash anything. Of course if the matrices are
> incompatible for multiplication it will screw up. Actually, it will
> truncate one or both matrices along some dimension, and multiply a
> maximal multiply-compatible pair of submatrices.
[ SNIP ]

>
> So the question is, what did you mean by bounds checking? If you meant
> "make sure not to walk off the end of an array and crash" then they won't
> crash. If you meant "make sure the 'matrix' isn't actually ragged-right,
> and that matrices are compatible for multiplication" then they won't
> throw exceptions on those conditions, and instead will return probably-
> garbage results.
>
The latter was what I meant. I don't consider a matrix multiplication 
language comparison example to be complete unless it demonstrates that 
kind of checking. I'm not anal about it - a bit of handwaving that says 
that a matrix type ("class" or similar) exists that takes care of some 
of the checking at construction time is cool. But you'd certainly want 
to show the compatibility check.

AHS
-- 
We must recognize the chief characteristic of the modern era - a 
permanent state of what I call violent peace.
-- James D. Watkins

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


Thread

Re: Why “new”? Ken Wesson <kwesson@gmail.com> - 2011-02-05 05:56 +0100
  Re: Why “new”? Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-02-05 11:10 -0400
    Re: Why “new”? Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-02-06 09:09 -0400

csiph-web