Closed erights closed 4 years ago
I introduced this proposal to some senior programmers and many have the first impression that "hide implementation" could save memory because no function source need to preserved, and "sensitive" could further increase performance because eliminating some stack info and the "sensitive" functions could be inlined...
So I'm very worry about abusing of these directives...
@hax See the appendix for more about how the directive will not affect memory usage for mainstream engines. Regarding the stack info, engines are already free to perform TCE due to PTCs. So even through a non-standard stack inspection API, you still can't rely on presence in a stack trace or absence of inlining.
Whether the community is stupid enough to sprinkle these directives all over due to expectant performance gains despite the advice given to them by people who should know better is another question.
Whether the community is stupid enough to sprinkle these directives all over due to expectant performance gains despite the advice given to them by people who should know better is another question.
What a remarkable statement to make.
See the appendix for more about how the directive will not affect memory usage for mainstream engines.
@michaelficarra Of coz I've read it before I introduced this proposal. What I mean is:
Whether the community is stupid enough to sprinkle these directives all over due to expectant performance gains despite the advice given to them by people who should know better is another question.
I feel we can't easily say abusing "is a another question". At least this not match many other similar cases I've read in many other proposals.
@hax Yeah I'm not saying that we should ignore the potential for its abuse. I'm just saying there's not much we can do to predict misuse/abuse of features we add. We just need to consider what the consequences will be. Will they be bad for the whole ecosystem or just the perpetrator? Is it something that could be solved through outreach?
This is not true of XS. Thus, this sentence should make clear that the premise applies to some engines but not to others.
Attn @phoddie