Skip to content

Commit 8b42398

Browse files
committed
Additional notes about why we're not in the way of junction-like Any/All functions
1 parent 3325761 commit 8b42398

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

ppcs/ppcTODO-more-list-utils.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,22 @@ If this feature is to be considered, it will require careful thought on how it m
9595

9696
## Rejected Ideas
9797

98-
* Supporting syntax analogous to the "deferred-expression" form of `grep EXPR, LIST`.
98+
### Block-less syntax
99+
100+
Supporting syntax analogous to the "deferred-expression" form of `grep EXPR, LIST`.
101+
102+
### Keywords as Junctions
103+
104+
Using the `any` and `all` keywords to make junction-like behaviour. Such is already provided by other modules, for example [`Data::Checks`](https://metacpan.org/pod/Data::Checks) in a title-case form and thus would not collide with the all-lowercase keywords provided here. This is already possible:
105+
106+
```
107+
use Data::Checks qw( Any ... );
108+
use Syntax::Operator::Is;
109+
110+
if( $x is Any( things... ) ) { ... }
111+
```
112+
113+
In any case, as junctions behave like values, they do not require special syntax like the block-invoking keywords proposed here, so they can be provided by regular function-call syntax from regular modules.
99114

100115
## Open Issues
101116

0 commit comments

Comments
 (0)