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


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

Re: The Assignment Principle

From Robert Klemme <shortcutter@googlemail.com>
Newsgroups comp.lang.java.programmer
Subject Re: The Assignment Principle
Date 2014-01-27 18:50 +0100
Message-ID <bknkjeF14acU1@mid.individual.net> (permalink)
References <assignment-principle-20140126210852@ram.dialup.fu-berlin.de> <lc4243$fqg$1@dont-email.me>

Show all headers | View raw


On 26.01.2014 23:27, markspace wrote:

> Math.random() is kind of an exception, as well as NaN, which has its own
> semantics for comparisons.
>
> It's fair to point out that objects have states, and method invocation
> often returns different values based on their internal state.
>
>    InputStream in = ...
>    v = in.read();
>
> Is going to return a different value for each invocation, generally
> speaking.

That's why I would disagree calling Math.random() an exception.  So 
basically the original quoted principle can only reasonably apply to 
values (object references and primitive type values).  And there NaN is 
really an exception.

Kind regards

	robert

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


Thread

Re: The Assignment Principle markspace <markspace@nospam.nospam> - 2014-01-26 14:27 -0800
  Re: The Assignment Principle Robert Klemme <shortcutter@googlemail.com> - 2014-01-27 18:50 +0100
    Re: The Assignment Principle markspace <markspace@nospam.nospam> - 2014-01-27 13:33 -0800
      Re: The Assignment Principle Robert Klemme <shortcutter@googlemail.com> - 2014-01-29 06:10 -0800
        Re: The Assignment Principle Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2014-01-29 16:24 +0200
  Re: The Assignment Principle FredK <fred.l.kleinschmidt@gmail.com> - 2014-01-27 12:04 -0800

csiph-web