Hi all,
Happy New Year!
This is a pre-PPC for asking if we want a full PPC focused on data checks,
an innovative approach to ensuring data integrity in Perl without
explicitly using the overloaded term "type". This would have been sent
sooner, but internal bike-shedding combined with some contentious
discussion on P5P left me needing to recharge my batteries.
After considerable development, including a comprehensive spec and a robust
implementation passing nearly 200,000 tests, we're at a pivotal point. Our
solution currently employs attributes for data checks, as seen here:
sub fibonacci :returns(UINT) ($nth :of(PositiveInt)) {
...
}
However, this approach has sparked debate. We considered alternatives like
prefix or postfix data checks for better clarity and efficiency:
sub fibonacci (PositiveInt $nth) :returns(UINT) {
...
}
or
sub fibonacci ($nth PositiveInt) :returns(UINT) {
...
}
The crux of our discussion is the syntax for return types. We're striving
to integrate seamlessly with Perl's existing syntax while introducing this
powerful new feature. Most proposed syntaxes for declaring data checks on
returned values have had issues of one sort or another.
The proposal would offer a rich array of features including a core type
hierarchy, user-defined types, parameterized checks, check expressions,
coercions, and more, all designed to enhance Perl's robustness and
reliability.
- We have a spec:
https://gist.github.com/thoughtstream/08b7fd48b09c99ae47d6d9f82b913986
(warning: it's massive)
- We have an implementation: https://github.com/Perl-Apollo/oshun
(almost 200,000 tests are passing)
- We have a problem: the syntax
I believe this would represent a huge step forward for Perl, and I'm
looking forward to your feedback.
Best,
Ovid
Happy New Year!
This is a pre-PPC for asking if we want a full PPC focused on data checks,
an innovative approach to ensuring data integrity in Perl without
explicitly using the overloaded term "type". This would have been sent
sooner, but internal bike-shedding combined with some contentious
discussion on P5P left me needing to recharge my batteries.
After considerable development, including a comprehensive spec and a robust
implementation passing nearly 200,000 tests, we're at a pivotal point. Our
solution currently employs attributes for data checks, as seen here:
sub fibonacci :returns(UINT) ($nth :of(PositiveInt)) {
...
}
However, this approach has sparked debate. We considered alternatives like
prefix or postfix data checks for better clarity and efficiency:
sub fibonacci (PositiveInt $nth) :returns(UINT) {
...
}
or
sub fibonacci ($nth PositiveInt) :returns(UINT) {
...
}
The crux of our discussion is the syntax for return types. We're striving
to integrate seamlessly with Perl's existing syntax while introducing this
powerful new feature. Most proposed syntaxes for declaring data checks on
returned values have had issues of one sort or another.
The proposal would offer a rich array of features including a core type
hierarchy, user-defined types, parameterized checks, check expressions,
coercions, and more, all designed to enhance Perl's robustness and
reliability.
- We have a spec:
https://gist.github.com/thoughtstream/08b7fd48b09c99ae47d6d9f82b913986
(warning: it's massive)
- We have an implementation: https://github.com/Perl-Apollo/oshun
(almost 200,000 tests are passing)
- We have a problem: the syntax
I believe this would represent a huge step forward for Perl, and I'm
looking forward to your feedback.
Best,
Ovid