http://www.perlmonks.org?node_id=536344


in reply to YAML's No in Perl

use YAML::Syck; $YAML::Syck::ImplicitTyping = 1; Load("No"); # undef
I had ImplicitTyping on, but Ingy told me it should be off by default to save time and reduce confusion and improve compatibility. So... Blame him. :-)

Replies are listed 'Best First'.
Re^2: YAML's No in Perl
by dgaramond2 (Monk) on Mar 14, 2006 at 01:27 UTC

    Hi audrey.

    Save time? Execution time? Please explain... I think YAML::Syck is fast enough for all of my needs.

    Improve compatibility with what, older Perl modules (all of which are 'alpha' or 'beta' and should not guarantee API/backwards compatibility anyway)? I would vote for better interoperability with the other YAML-using languages, as it is one of YAML's biggest strength.

    Reduce confusion? Hm, that's not what I experienced. Implicit typing is also one of YAML's basic features.

    So, turn it and keep it on please :)

      Okay, I did add a prominient notice to YAML::Syck 0.38 and credited you for it in the ChangeLog. Thanks!
        Sweet, thanks! I'm ready to be blamed for this in the future :-)
Re^2: YAML's No in Perl
by bsb (Priest) on Jul 23, 2006 at 23:49 UTC
    I think Ingy's right, implicit typing should be off by default. It caused all kinds of bugs including turning an md5 hash string that happened to match /^\d+e\d+$/ into NaN.

    Implicit typing should only be enabled if it doesn't interfere with round-tripping, Perl's polymorphic scalars seem to me to make this impossible.

    ImplicitTyping--