This is more "an historical question", I ask here because it's kind of hard to search with throughout the net to get more informations about that, plus the spec isn't really extensive about why it has fallen into legacy.
I know it's forbidden in strict mode, considered bad practice, confusing, etc. but I'm actually wondering what were the motivations behind this ?
If you know about its "quirks", it looks quite like a normal feature, there are worse stuff present in the languages that have not been deprecated.
It's just a genuine question, I stumbled upon this because I wanted to try something like:
class A {
test() {
with(this) {
console.log(test)
}
}
}
But ES classes are implicitely in strict mode from my understanding.
PS: I know it's possible to do in other ways (const {test} = this for example), the aim of the question is more about why it was almost "outed of the spec"
I was hoping for a more "official explanation" (like a comittee notes or discussions) but I guess the process was maybe not that standardized at that time (seems to be before ES5).
The links you provided mainly talk about the "quirks" I was referring too, but they don't per se justify the removal of this feature in strict mode and deprecation. Most of them just tell it's confusing and error-prone.
The first link does talk about being harder to optimize and that it may have been removed for security reasons according to Brendan Eich (but from a tweet), but these seems more that educated guesses rather from the author
Yep there are notes for 2008/2009, leading up to ES5. They are mostly the agendas and some excerpts, rather than the full conversations.
I canβt admit to doing a full exhaustive search, so maybe there is a good archived document to reference there if someone has the time to scan through them.