> > Without that you'd have to worry about conditional expressions silently > changing their result between 3x and 4x. >
This x 1000. This is an absolute MUST for the release of 4.0 lest we silently alter every system out there (terrifying). Trevor On Tue, Nov 4, 2014 at 5:28 PM, Joshua Hoblitt <[email protected]> wrote: > On 11/04/2014 09:46 AM, Henrik Lindberg wrote: > > It is a bit difficult since operators are overloaded on type. The good > > part is that if we stop transforming strings to numbers there will be > > errors for arithmetic expressions. > > > > The bad part is that ==, != cannot raise errors (since a string is > > simply not equal to a number). Currently comparisons order all numbers > > to be smaller than all strings. We could change those to instead error > > if the types are not comparable to each other. > > I think raising an exception when the types of operands to a comparison > operator are different is the least surprising behavior absent automatic > type conversion. > > It would also provide at lot more confidence that a manifest is 4x safe > if it passes `puppet parser validate`. Without that you'd have to worry > about conditional expressions silently changing their result between 3x > and 4x. > > -Josh > > -- > > -- > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/puppet-dev/54590CCE.1030305%40cpan.org. > For more options, visit https://groups.google.com/d/optout. > -- Trevor Vaughan Vice President, Onyx Point, Inc (410) 541-6699 [email protected] -- This account not approved for unencrypted proprietary information -- -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-dev/CANs%2BFoUGjC%3Dg_Qm%3DQUUtAvuuz4MP7owM4M645P%3DVEmJrhdB34w%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
