From murdoch.duncan at gmail.com  Thu May  2 16:49:28 2013
From: murdoch.duncan at gmail.com (Duncan Murdoch)
Date: Thu, 02 May 2013 10:49:28 -0400
Subject: [Rd] Patch proposal for R style consistency (concerning
	deparse.c)
In-Reply-To: <CAO1zAVb=TJdRoJhUoYy=N4g+iw_qgHt59n5CH+AXqR-EU4ixNw@mail.gmail.com>
References: <CAErODj85saboM+8SaYKKVVDL6cPeX=LVR=PKwY+FZb2ky_cpBg@mail.gmail.com>
	<5478C197-76AB-481D-A1AA-64DB63D8D122@gmail.com>
	<CAErODj_N+FCjP1zt2H4VHv28o8RDU8sQ-W4qGONkx1gLvC33pg@mail.gmail.com>
	<CANROs4emmr=rGLKWpCQ6z_016mAk7O42=ttA1BLnc9zQ_DTzqQ@mail.gmail.com>
	<51787400.7010305@fhcrc.org> <51787C98.2030106@gmail.com>
	<5178D695.30009@fhcrc.org>
	<CAErODj9nL5SOPCJ1R=NjueZAiG=WJo1V1KwPxbNGJpR1z1bJbg@mail.gmail.com>
	<CAC+N9BWCDacT_cCD3fGAb2EgB+oaQ0qGNq0fkOWsigzZtTJfaA@mail.gmail.com>
	<51816ABC.1070407@gmail.com>
	<CAO1zAVb=TJdRoJhUoYy=N4g+iw_qgHt59n5CH+AXqR-EU4ixNw@mail.gmail.com>
Message-ID: <51827CF8.5020309@gmail.com>

On 01/05/2013 3:34 PM, Joris Meys wrote:
> +1 for "} else {" . It might seem a detail, but I agree wholeheartedly 
> that this would make teaching R easier.

Just one last comment to finish off my participation in this thread.  I 
think that in general, "+1" votes mean almost nothing. To have a change 
accepted, you need to convince a member of R Core that it's a good idea, 
without convincing another one that it's a bad idea.

Personally I listen to arguments for changes, but repetitions of the 
same argument are just irritating.  I was not convinced by the 
copy-and-paste argument.  I think that if this is causing you problems 
in teaching, you're doing it wrong.  I'm not going to be convinced by 
repetitions of that same argument.

Duncan Murdoch

>
> Btw, thank you Paul for the link to your coding style document. It was 
> a nice read.
>
> Cheers
> Joris
>
>
> On Wed, May 1, 2013 at 9:19 PM, Duncan Murdoch 
> <murdoch.duncan at gmail.com <mailto:murdoch.duncan at gmail.com>> wrote:
>
>     On 01/05/2013 1:34 PM, Tim Triche, Jr. wrote:
>
>         +1 to having runnable code emitted
>
>
>     It does emit runnable code, which is why Herve's complaint was
>     nonsense.  It doesn't emit code of which every substring is runnable.
>
>     Duncan Murdoch
>
>
>         patch seems to work nicely, hopefully R-core will agree to
>         apply it to HEAD
>
>
>
>         On Wed, May 1, 2013 at 9:45 AM, Paul Johnson
>         <pauljohn32 at gmail.com <mailto:pauljohn32 at gmail.com>> wrote:
>
>         > Whoa.
>         >
>         > Don't let my valuable suggestion get lost.
>         >
>         >  I want "} else {".  Yihue wants "} else {".  And I have not
>         heard anybody
>         > say they prefer the other way, unless you interpret Duncan's
>         comment
>         > "that's nonsense" as a blanket defense of the status quo.
>         But I don't think
>         > he meant that.  This is a matter of style consistency and
>         avoidance of new
>         > R-user confusion and error.
>         >
>         > After reading the help for "if", I don't see how anybody can
>         argue against
>         > this.  Good R code has this style:
>         >
>         > } else {
>         >
>         > and not
>         >
>         > }
>         >  else
>         >
>         > because the latter fails if it is run line-by-line.  While
>         trying to teach
>         > people how to write R programs, it would be nice if the
>         output of
>         > print.function was consistent with the good way, the way
>         that is actually
>         > practiced in the R source code itself. This is a major
>         source of new
>         > programmer confusion. Its very tough to explain and teach.
>         >
>         > pj
>         > --
>         > Paul E. Johnson
>         > Professor, Political Science      Assoc. Director
>         > 1541 Lilac Lane, Room 504      Center for Research Methods
>         > University of Kansas                 University of Kansas
>         > http://pj.freefaculty.org http://quant.ku.edu
>         >
>         >         [[alternative HTML version deleted]]
>         >
>         > ______________________________________________
>         > R-devel at r-project.org <mailto:R-devel at r-project.org> mailing
>         list
>         > https://stat.ethz.ch/mailman/listinfo/r-devel
>         >
>
>
>
>
>     ______________________________________________
>     R-devel at r-project.org <mailto:R-devel at r-project.org> mailing list
>     https://stat.ethz.ch/mailman/listinfo/r-devel
>
>
>
>
> -- 
> Joris Meys
> Statistical consultant
>
> Ghent University
> Faculty of Bioscience Engineering
> Department of Mathematical Modelling, Statistics and Bio-Informatics
>
> tel : +32 9 264 59 87
> Joris.Meys at Ugent.be
> -------------------------------
> Disclaimer : http://helpdesk.ugent.be/e-maildisclaimer.php



[Rd] Patch proposal for R style consistency (concerning deparse.c)
Duncan Murdoch