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


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

Re: Assigning void

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!news.musoftware.de!wum.musoftware.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From Robert Klemme <shortcutter@googlemail.com>
Newsgroups comp.lang.java.programmer
Subject Re: Assigning void
Date Sun, 14 Oct 2012 14:09:24 +0200
Lines 42
Message-ID <advobpFr195U1@mid.individual.net> (permalink)
References <mn.655e7dca256cdfb1.70216@a.com> <k5c2q6$hio$1@dont-email.me> <ad6ec7c9-9609-497b-b4e4-d8e912a31b8e@googlegroups.com> <k5cgkd$98n$1@dont-email.me> <1b846149-65a7-4482-b965-71e1fa7c6d75@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-Trace individual.net bn8Af1KHnS27aLfjwicVRwx44fGyxkOLBgQuFzUvvqKh/j5znpbr+bMx4HtbqOqPM=
Cancel-Lock sha1:6YkDhgByM2II1sKkp7u5JBuXB3A=
User-Agent Mozilla/5.0 (Windows NT 6.0; WOW64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1
In-Reply-To <1b846149-65a7-4482-b965-71e1fa7c6d75@googlegroups.com>
Xref csiph.com comp.lang.java.programmer:19323

Show key headers only | View raw


On 13.10.2012 22:03, Lew wrote:
> markspace wrote:

>> I'd consider post-increment there a side effect, yet it's legal.  Yes, I
>> know there's an implied (required) assignment there, but it's still
>> side-effecty.
>
> No true Scotsman.
>
> It isn't an implied assignment, it's an explicit one.
> http://docs.oracle.com/javase/specs/jls/se7/html/jls-15.html#jls-15.14.2
>
> Since it's the purpose of the operator, it's not "side effecty", it's
> "direct effecty".

My memory might be a bit rusty but the definition of "side effect" that 
I learned was that it is a state change not reflected in the result. 
That includes IO for example, even if one could argue that the main 
effect of System.out.println("foo") is to print "foo\n" on the console. 
  The definition of "side effect" I have in mind solely deals with a 
distinction important in the context of functional languages.  A side 
effect free expression has some properties which go away when side 
effects are introduced (thread safety, stability which has effects on 
analysis of behavior etc.).  The introductory paragraph on the Wikipedia 
page nicely sums this:
http://en.wikipedia.org/wiki/Side_effect_%28computer_science%29

> Unless assignment through '=' is also "side effecty".

Yes, because variable assignment changes state.  If you think about it, 
statements in languages which have statements (additionally to 
expressions) only make sense at all if there are side effects.  A 
statement (which doesn't have a result) in a language completely free of 
side effects would do nothing - ever.

Kind regards

	robert

-- 
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/

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


Thread

Assigning void Wojtek <nowhere@a.com> - 2012-10-12 22:54 -0700
  Re: Assigning void Lew <lewbloch@gmail.com> - 2012-10-12 23:27 -0700
    Re: Assigning void Wojtek <nowhere@a.com> - 2012-10-13 12:35 -0700
  Re: Assigning void Eric Sosman <esosman@comcast-dot-net.invalid> - 2012-10-13 09:26 -0400
  Re: Assigning void Donkey Hottie <donkey@fredriksson.dy.fi> - 2012-10-13 17:06 +0300
    Re: Assigning void Jeff Higgins <jeff@invalid.invalid> - 2012-10-13 10:34 -0400
    Re: Assigning void Wanja Gayk <brixomatic@yahoo.com> - 2012-10-13 22:33 +0200
      Re: Assigning void Jeff Higgins <jeff@invalid.invalid> - 2012-10-13 17:34 -0400
      Re: Assigning void Eric Sosman <esosman@comcast-dot-net.invalid> - 2012-10-13 17:45 -0400
        Re: Assigning void Eric Sosman <esosman@comcast-dot-net.invalid> - 2012-10-13 21:35 -0400
        Re: Assigning void Wanja Gayk <brixomatic@yahoo.com> - 2012-10-16 00:16 +0200
  Re: Assigning void Jeff Higgins <jeff@invalid.invalid> - 2012-10-13 11:59 -0400
    Re: Assigning void glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-10-13 17:05 +0000
      Re: Assigning void Jeff Higgins <jeff@invalid.invalid> - 2012-10-13 14:26 -0400
        Re: Assigning void markspace <-@.> - 2012-10-13 11:51 -0700
          Re: Assigning void Jeff Higgins <jeff@invalid.invalid> - 2012-10-13 15:08 -0400
          Re: Assigning void Wojtek <nowhere@a.com> - 2012-10-13 12:28 -0700
            Re: Assigning void markspace <-@.> - 2012-10-13 12:42 -0700
              Re: Assigning void Lew <lewbloch@gmail.com> - 2012-10-13 12:54 -0700
                OT - Trolling Wojtek <nowhere@a.com> - 2012-10-13 14:16 -0700
                Re: OT - Trolling Jeff Higgins <jeff@invalid.invalid> - 2012-10-13 18:09 -0400
                Re: OT - Trolling Gene Wirchenko <genew@ocis.net> - 2012-10-14 18:47 -0700
              Re: Assigning void Martin Gregorie <martin@address-in-sig.invalid> - 2012-10-13 20:28 +0000
              Re: Assigning void Wojtek <nowhere@a.com> - 2012-10-13 13:31 -0700
                Re: Assigning void Joerg Meier <joergmmeier@arcor.de> - 2012-10-20 18:00 +0200
                Re: Assigning void Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2012-10-20 09:56 -0700
                Re: Assigning void "Peter J. Holzer" <hjp-usenet2@hjp.at> - 2012-10-21 13:24 +0200
                Re: Assigning void Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2012-10-21 10:23 -0700
                Re: Assigning void "Peter J. Holzer" <hjp-usenet2@hjp.at> - 2012-10-22 00:13 +0200
                Re: Assigning void Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2012-10-21 16:25 -0700
                Re: Assigning void "Peter J. Holzer" <hjp-usenet2@hjp.at> - 2012-10-22 08:43 +0200
                Re: Assigning void "Peter J. Holzer" <hjp-usenet2@hjp.at> - 2012-10-22 10:18 +0200
                Re: Assigning void Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2012-10-22 08:14 -0700
                Re: Assigning void glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-10-21 19:45 +0000
                Re: Assigning void "Peter J. Holzer" <hjp-usenet2@hjp.at> - 2012-10-22 00:14 +0200
            Re: Assigning void Lew <lewbloch@gmail.com> - 2012-10-13 12:44 -0700
              Re: Assigning void Jukka Lahtinen <jtfjdehf@hotmail.com.invalid> - 2012-10-15 14:38 +0300
                Re: Assigning void Lew <lewbloch@gmail.com> - 2012-10-15 09:11 -0700
        Re: Assigning void Jeff Higgins <jeff@invalid.invalid> - 2012-10-13 15:03 -0400
          Re: Assigning void glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-10-13 20:21 +0000
    Re: Assigning void Lew <lewbloch@gmail.com> - 2012-10-13 12:38 -0700
      Re: Assigning void markspace <-@.> - 2012-10-13 12:49 -0700
        Re: Assigning void Lew <lewbloch@gmail.com> - 2012-10-13 13:03 -0700
          Re: Assigning void Robert Klemme <shortcutter@googlemail.com> - 2012-10-14 14:09 +0200
            Re: Assigning void Lew <lewbloch@gmail.com> - 2012-10-14 11:31 -0700
      Re: Assigning void Jeff Higgins <jeff@invalid.invalid> - 2012-10-13 19:55 -0400
        Re: Assigning void Jeff Higgins <jeff@invalid.invalid> - 2012-10-13 20:25 -0400
          Re: Assigning void Jeff Higgins <jeff@invalid.invalid> - 2012-10-13 21:01 -0400
            Re: Assigning void Gene Wirchenko <genew@ocis.net> - 2012-10-14 18:42 -0700
  Re: Assigning void Roedy Green <see_website@mindprod.com.invalid> - 2012-10-14 00:51 -0700
  Re: Assigning void Jeff Higgins <jeff@invalid.invalid> - 2012-10-14 10:40 -0400
  Re: Assigning void Sven Köhler <remove-sven.koehler@gmail.com> - 2012-10-21 01:24 +0200
    Re: Assigning void Wojtek <nowhere@a.com> - 2012-10-21 14:52 -0700
      Re: Assigning void Eric Sosman <esosman@comcast-dot-net.invalid> - 2012-10-21 20:13 -0400
        Re: Assigning void Wojtek <nowhere@a.com> - 2012-10-21 20:20 -0700
          Re: Assigning void Sven Köhler <remove-sven.koehler@gmail.com> - 2012-10-22 11:12 +0200
        Re: Assigning void Wanja Gayk <brixomatic@yahoo.com> - 2012-10-24 22:03 +0200
          Re: Assigning void Eric Sosman <esosman@comcast-dot-net.invalid> - 2012-10-24 17:47 -0400
            Re: Assigning void Wanja Gayk <brixomatic@yahoo.com> - 2012-10-25 01:02 +0200
              Re: Assigning void Eric Sosman <esosman@comcast-dot-net.invalid> - 2012-10-24 20:21 -0400
                Re: Assigning void Martin Gregorie <martin@address-in-sig.invalid> - 2012-10-25 20:04 +0000
                (OT) Re: Assigning void Eric Sosman <esosman@comcast-dot-net.invalid> - 2012-10-25 16:31 -0400
                Re: (OT) Re: Assigning void Martin Gregorie <martin@address-in-sig.invalid> - 2012-10-25 20:44 +0000
            Re: Assigning void Arved Sandstrom <asandstrom2@eastlink.ca> - 2012-10-25 07:25 -0300
              Re: Assigning void Lew <lewbloch@gmail.com> - 2012-10-25 11:12 -0700
      Re: Assigning void Sven Köhler <remove-sven.koehler@gmail.com> - 2012-10-22 11:01 +0200
      Re: Assigning void Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2012-10-23 00:38 +0200

csiph-web