On Sun, Aug 10, 2014 at 10:53 PM, Reid Vandewiele <r...@puppetlabs.com>
wrote:

> On Sunday, August 10, 2014 7:11:11 PM UTC-7, Trevor Vaughan wrote:
>>
>> Yeah, I know that it doesn't actually mutate. But it *feels* like it
>> does, which is the issue.
>>
>> Trevor
>>
>
> For this reason I would advocate omission of += and -= from the language.
>
> The problem is not that the behavior is inconsistent or that it breaks any
> -rules-, per se. The problem is that the behavior is non-intuitive and not
> just in a difficult-to-guess-at way, but in a can-directly-confuse-users
> way. Yes, $fqdn is potentially different from $::fqdn but if we're trying
> to guide people into a mindset of "variables are immutable" we should not
> muddy the waters with syntax that looks contradictory to that paradigm -
> especially if all it gains us is saving a few characters being typed.
>
> I believe this constitutes a compelling design reason to remove += and -=.
>
>
I can agree to that. Reid, I suppose that you've encountered people being
confused by this when working with new puppet users?

I just chatted with Hunter and Ashley on #puppet-dev and they also agree
that += should be taken out back and shot. We also discussed how best to
remove it, and the conclusion that we came to was:

  * leave it as-is in the current parser. Don't even issue a deprecation
warning
  * mention += going away in the docs
  * Remove the implementation from the future parser
  * Retain the ability in the future parser to parse += and -=
  * When += or -= are encountered, the validation step will issue an error
(this allows us to issue a much better error than just "Syntax Error")
  * Remove all mention of += and -= from the specification. This isn't part
of the language, the implementation is only dealing with it to produce a
good error message for the transition.

I just checked a dump of the forge from yesterday and += is still only used
in the 2 modules that I mentioned in the ticket, so it hasn't proliferated
as far as I can tell.


> ~Reid
>
> --
> 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/4a0b0503-dd0a-408f-b856-afe91374a924%40googlegroups.com
> <https://groups.google.com/d/msgid/puppet-dev/4a0b0503-dd0a-408f-b856-afe91374a924%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> 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/CANhgQXsdCPtq0NgQvkei1xje6cPjucTUQpfNbbBf12WJSJ969w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to