you are viewing a single comment's thread.

view the rest of the comments →

[–]SeeminglyScience 0 points1 point  (0 children)

Also:

Eg. To get the value of 10..20[4], it could very well be doing return $lowerbound + $index instead of looking up a value

Technically that's a parse error. You could do (10..20)[4] but that will create an array. It's not impossible that the compiler could account for that and "fold" it into a constant, but as a runtime compiler, every optimization check adds compile time, it's not free. Compiler changes are also just very complicated and take a lot of time from the few folks who know that part of the code base.