On Wed, Aug 4, 2021 at 10:58 AM Paul "LeoNerd" Evans <leonerd@leonerd.org.uk> wrote: > I propose the addition of a new SV type, of SVt_BOOL. Should I write an > RFC? > > This type will act much like the existing "booleans" of PL_sv_no and > PL_sv_yes, except its type will remain distinct, so it will be possible > to distinguish "that SV is a boolean". This is a requirement for > certain kinds of data serialisation - such as JSON or MsgPack - and may > be useful for many other purposes too. > > Still to be determined: a pureperl interface on it. E.g. would this be > possible: > > use feature 'bool'; > > my $yes = true; # new literal value keywords > my $no = false; # > > use Scalar::Util 'svtype'; > > is( svtype($yes), "BOOL", 'true is SVt_BOOL'); > > Thoughts on a postcard*. > > > *: Where "postcard" means: **PLEASE KEEP REPLIES SHORT**. This is a > pre-RFC question. Replies should be limited to the question of whether > I should write the RFC - not about the feature itself. > I think this would be an excellent idea, as it would assist with both the serialization problem and newcomer's expectations. -DanThread Previous