In a message dated Wed, 4 Oct 2006, chromatic writes:
The assumption I remember from the design meetings was always "No library
designer has the knowledge or the right to tell me how fast or strict my
program has to run."  Whatever B&D you do in the privacy of your own modules
is fine, but if it leaks out past encapsulation boundaries, expect that
somewhere you might offend community standards.

Yes, but by the same token, no library designer should force you to be *less* strict than you wish to. I remember not so many years ago when there were a lot of modules floating around that required you to do "no strict" of various flavors in order to use them. I still run across modules that need "no warnings". (I won't name names, because some of their authors post to this list ;)

It should at the very least be *possible* to write modules that can be used in every level of strictness from one-liners to every-possible-stricture, everything-typed, everything-contracted systems. If it's fairly easy to do, so much the better--there's a better chance that you won't have to fork somebody else's module to get it to work with the level of B&D you want.

As for the core--in DBC, which is what started this thread in the first place, the compiler and runtime do various correctness inferences based on contracts. If you call some code that doesn't have a contract, you can either blow up, or you can just assert that the code you're calling is correct--at which point you can no longer guarantee your own contract. It's not a stricture that can be lexically toggled off and on like a pragma.

So if Perl 6 is going to support DBC, the core needs to support DBC too. Nobody is forcing you to use DBC in order to use the core modules, though.

In fact, most DBC systems I'm aware of run in production with contract-checking turned off; the checks are for testing and debugging. So even DBC programs themselves have to be able to run at a lower level of strictness.

In my opinion,Perl 6 should spell "no bondage":


No, it should spell "no more, or less, bondage than you want".


Reply via email to