http://qs321.pair.com?node_id=11133583


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:
S, G ... N
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 <<< L
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?

EDIT: This would be valid for easily computable Ns also. We could say: 1 is infinite relative to 0, * + 2, any L.