On Tue, Jul 29, 2014 at 4:17 PM, Rahul Gopinath <ra...@puppetlabs.com>
wrote:

> Andy,
>
> [...]
> > Absolutely. I haven't looked at the full context of that statement, but
> > there is likely something that is being guarded by the return value of
> > execute_prerun_command, but the guard isn't made clear by the structure
> of
> > the code. What the transformation does is to open it up to possible
> problems
> > later on.
> >
> > [snip]
> >>
> >> So the boolean operators don't have equivalent behavior to the flow
> >> control operators in a number of circumstances - how do we want to
> proceed
> >> with this?
> >>
> >
> > I think we can continue on the current course, *if* there is follow up to
> > fix those very strange expressions.
>
> I am not entirely sure what you mean by the strange expressions here.
> The pull request does not have the kind of expressions that Adrien
> talks about.  He is also pointing out that _if_ parenthesis is removed
> from the equivalent expression, it results in a syntax error. So there
> cant be a one to one replacement without adding a wrapping
> parenthesis. This is not the case in the pull request.
>
>
By "strange expressions" I was referring to ones that are in forms that a
developer would seldom, if ever, write. Things like the example that Adrien
gave, where the parenthesis are required to get the code to parse correctly.

Right now the PRs are doing a mechanical transformation to remove a keyword
that we don't want to use. What is missing is that it isn't transforming
the code into what later changes to that code should preserve. Or put
another way, if we got a PR that contained new code that looked like that
we would reject it, I think. It passes the test of not using disallowed
operators, but it doesn't pass the test of being written in a form that a
reader would expect. Here is an example
https://github.com/puppetlabs/puppet/pull/2900/files#diff-f9ef6a029a765863382f55a75a8fbd7cR27


> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-dev+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-dev/CA%2BemFfzVKzhQv%2Bx1gZRZt-FX9jP1gx5HMUXdtRJcbGjoWgHe3w%40mail.gmail.com
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Andrew Parker
a...@puppetlabs.com
Freenode: zaphod42
Twitter: @aparker42
Software Developer

*Join us at PuppetConf 2014 <http://www.puppetconf.com/>, September
22-24 in San Francisco*
*Register by May 30th to take advantage of the Early Adopter discount
<http://links.puppetlabs.com/puppetconf-early-adopter> **—**save $349!*

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-dev/CANhgQXsBDbrm5ymD4bxY0AAmf7yaup2HU1KVS1%3DsQJjJ%2BHZpHQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to