in reply to Re^4: [Raku] Ranges in array slices
in thread [Raku] Ranges in array slices
I think we all agree here on what's what and there's no point to argue about. I'll however continue my line of thinking just as a lighthearted musing.
It's a language feature and so if there is an error, it will be a semantic error. Or possibly not, as this feature can be productively exploited.
For example, let's take a hard to calculate number N and use it as the last element condition. And for the generator function let's use a G, and some S for the starting point. Here' the formula:
EDIT: This would be valid for easily computable Ns also. We could say: 1 is infinite relative to 0, * + 2, any L.
It's a language feature and so if there is an error, it will be a semantic error. Or possibly not, as this feature can be productively exploited.
For example, let's take a hard to calculate number N and use it as the last element condition. And for the generator function let's use a G, and some S for the starting point. Here' the formula:
So we're testing N against G for S. As the test duration can explode towards infinity, we need to limit the number of steps or the time of our test. Let's name this limitation "<<< L" in pseudocode:S, G ... N
If the test doesn't end before L, we could consider this a proof of absurdity (or semantic errorness) of "S, G ... N" relative to L. And isn't this absurdity similar to infinity of N? Couldn't we say N is infinite relative to S, G, L?S, G ... N <<< L
EDIT: This would be valid for easily computable Ns also. We could say: 1 is infinite relative to 0, * + 2, any L.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^6: [Raku] Ranges in array slices
by holli (Abbot) on Jun 06, 2021 at 18:56 UTC | |
by tomasz (Acolyte) on Jun 06, 2021 at 19:09 UTC |
In Section
Seekers of Perl Wisdom