develooper Front page | perl.perl5.porters | Postings from January 2014

Re: Marking a scalar as an unupgradable binary blob.

Thread Previous | Thread Next
Aristotle Pagaltzis
January 28, 2014 19:36
Re: Marking a scalar as an unupgradable binary blob.
Message ID:
* Zefram <> [2014-01-28 20:10]:
> Aristotle Pagaltzis wrote:
> > except that the machine is now helping you with that.
> How? The proposal didn't include the total incompatibility between
> mark-aware and mark-unaware string types that would warn of plumbing
> errors.

You mentioned marking strings as characters, which was only part of my
expanded proposal, not Yves’ more limited original proposal, and I said
mixing marked and unmarked strings needs to warn. (And then that warning
can be fatalised if you want strictness already.) It cannot be an error
for the reasons you have outlined, but a warning it can be, and ought to
be. For the same reason, I think it mixing marked and unmarked strings
actually ought to propagate the mark to the resulting value, rather than
extinguishing it. (I see I neglected to say this in my proposal.) That
way, marking a string will infect the entire data flow downstream from
there, and the warnings will then tell you everywhere you are deriving
values from it. Furthermore, if you mark some strings as octets and some
as characters somewhere upstream, and then go on to mix derived values
somewhere downstream, auto-propagation will ensure that that will blow
up in your face even now, which I think is exactly what you want.

Aristotle Pagaltzis // <>

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About