Re: A study on immutability usage

2012-10-05 Thread jdrewsen
On Monday, 1 October 2012 at 12:28:33 UTC, bearophile wrote: I am back. This study regards how "final" is used in Java programs, and generally how immutability is used and is useful: http://whiley.org/2012/09/30/profiling-field-initialisation-in-java/ ... Reminds me of C# 'readonly' http://m

Re: A study on immutability usage

2012-10-04 Thread Russel Winder
On Thu, 2012-10-04 at 03:49 +0200, Jesse Phillips wrote: […] > So, you are saying that these examples are exhibiting the same > problems because they are based on the same design? > > I don't see how that would invalidate the results. That is, I > don't see the relevance here. My comment relate

Re: A study on immutability usage

2012-10-03 Thread Jesse Phillips
On Wednesday, 3 October 2012 at 08:17:49 UTC, Russel Winder wrote: If we were to study software now in the way Richard Helm, Erich Gamma et al. did in the early 1990s would we find Proxy, Façade, Builder, etc. of course we would since the feedback loop of people knowing about them causes them t

Re: A study on immutability usage

2012-10-03 Thread Russel Winder
On Wed, 2012-10-03 at 00:37 -0400, Jeff Nowakowski wrote: > On 10/01/2012 09:39 PM, Bernard Helyer wrote: > >> Our results from 14 Java applications > > > > Only 14? So it's a useless statistic. > > No, that isn't true. How many language decisions in D are based on an > analysis of even 5 program

Re: A study on immutability usage

2012-10-02 Thread Jeff Nowakowski
On 10/01/2012 09:39 PM, Bernard Helyer wrote: Our results from 14 Java applications Only 14? So it's a useless statistic. No, that isn't true. How many language decisions in D are based on an analysis of even 5 programs, let alone 14? What if you were testing to see how fair a coin was, and

Re: A study on immutability usage

2012-10-02 Thread Peter Alexander
On Monday, 1 October 2012 at 12:28:33 UTC, bearophile wrote: Our results from 14 Java applications indicates that 72-82% of fields are stationary< programmers are sometimes forced (or voluntarily choose) to initialise fields late (i.e. after the constructor has completed). This prevents such

Re: A study on immutability usage

2012-10-02 Thread renoX
Interesting, I vaguely remember that Eiffel has a 'once' keyword, but I'm not sure if it could help here.

Re: A study on immutability usage

2012-10-01 Thread Bernard Helyer
Our results from 14 Java applications Only 14? So it's a useless statistic. Good to know. The rest seemed interesting.

Re: A study on immutability usage

2012-10-01 Thread Jesse Phillips
On Monday, 1 October 2012 at 12:28:33 UTC, bearophile wrote: Some quotations from the paper: Unkel and Lam developed the term "stationary field" to describe fields which are never observed to change, that is, all writes precede all reads [for such field in all instances of the class]< Our r

A study on immutability usage

2012-10-01 Thread bearophile
I am back. This study regards how "final" is used in Java programs, and generally how immutability is used and is useful: http://whiley.org/2012/09/30/profiling-field-initialisation-in-java/ Slides: http://www.ecs.vuw.ac.nz/~djp/files/RV2012.ppt Paper, "Pro ling Field Initialisation in Java",