On 2014-30-07 23:21, Andy Parker wrote:
Exactly. And that is why I'm a little nervous about just disallowing all
of these types. However, it will now fail fast and so the migration path
to the new system is: get rid of warnings, run with --parser future, fix
errors, check that your systems still work. OTOH what do we lose from
just continuing to stringify certain data types?
You lose control :-)
More specifically you loose control over how Numbers are stringified. Do
you want octal, hex or decimal? And if you are presenting a collection,
should all nested numbers be octal, hex, or decimal?
(The default stringification uses decimal).
Do you expect to be able to transform the string back to a data
structure? (It is not possible since undefs stringify as empty strings,
and there are no delimiters around String values.)
Also note that 4x stringification does not guarantee that it produces an
identical result to 3x, since 3x just used Ruby to_s on what it got,
where 4x uses the rules for string interpolation.
So, it was very deliberate to only allow string titles. It also removes
the ambiguity of the semantics of nested collections (i.e. it is safe to
flatten since you cannot possibly mean a stringified array).
If someone really wants a title that is a stringified hash they can
interpolate the value into a string.
- henrik
--
Visit my Blog "Puppet on the Edge"
http://puppet-on-the-edge.blogspot.se/
--
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/lrbt7r%24rtp%241%40ger.gmane.org.
For more options, visit https://groups.google.com/d/optout.