3 ms·
I can't see how that would work. The arguments variable is already hard to use (accessing it from within the function hardly helps you, and giving access to it
by robocat 3y ago
I can't see how that would work. The arguments variable is already hard to use (accessing it from within the function hardly helps you, and giving access to it by using it as a parameter to another function, or using another closure to capture it doesn't help you either). Apart from the fact that your idea would severely interfere with optimisations (e.g. causing JIT problems, and interfering with variable liveness analysis) - just like some other dynamic features do.
- jauntywundrkind 3y agoYou'd need a dependency graph of optimizations, to understand where a new dependency would cause other optimizations to need to potentially be disrupted. This doesn't seem like a hardfast cant. We keep getting arguments against doing stuff because it might not be performant. I don't disregard those concerns entirely. But I think we also over-actively forbid, we prematurely optimize by pruning possibility, all too often.