Dreaming the future of software; Project Editor ECMAScript 2015; Reformed Smalltalker JavaScript historian dl.acm.org/doi/abs/10.114@allenwb@mastodon.social

Sherwood Oregon USA
With pointing out that while the snow is unusual, the colors are the norm for a Willamette Valley Oregon winter day.
Snow in Sherwood OR today. View from my living room.
1
Allen Wirfs-Brock retweeted
Replying to @msimoni
Almost better: “automated refactoring is impossible without static types” Smalltalkers: invent first automated refactoring tool, Refactoring Browser
2
14
49
The problem with distributed teams and how to do it right. Read to the end for the solution
Did you see my interview with Bjorn Freeman-Benson on the three challenges of distributed teams? jamesshore.com/Blog/Three-Ch…
1
Sigh, you mean we could have had iotatrons instead of transistors? It would have been a different world.
12
25
The Xerox Star used a AMD2900-based buit slice processor rather than a off-the-self single chip microprocessor. That was state of the art design for late 1970s. The Wikipedia Star article includes a good history of the Star hardware en.wikipedia.org/wiki/Xerox_…
Replying to @binarybits
Architecturally, the Star was a minicomputer. This is the CPU of the Xerox Star. It took many chips to perform the functions that one chip handled on the Apple II, Lisa, and Macintosh. engblg.livingcomputers.org/i…
6
19
In hindsight, it may have been better to always: ESM = import CJS = require Also easier to refactor.
Great reply I think the confusion that keeps coming up is that Babel has an interopRequireDefault transform that makes default esm exports work as if they are cjs module.exports I think this was a p big mistake because now people understandably think esm should work that way
1
1
12
Assigning names to anonymous functions definitions is syntax driven. See for example 2nd to last rule of tc39.github.io/ecma262/#sec-… It literally is looking to see if the thing to the right of the = is a lambda def rather than looking for a function value. 1/
A bit surprised at this... ES6+ function name inference doesn't work with destructuring patterns:
1
2
8
When destructuring of a literal is involved, the targeted of the assignment (or binding) is syntactically remote from the source of the value with arbitrarily complex destructuring patterns and literals. Difficult to specify how to match them to check for a literal lambda 2/
1
1
Restructuring a literal containing lambdas is presumably relatively rare. It wasn’t worth the complexity (and editorial time) to include it in ES6. Name inferencing of lambdas was a usability gift from TC39 to the JS community. We did what seemed practical at the time. 3/3
3
Not specific to Typed Arrays. Rather can occur on any property set operation that transforms the stored value. EG: let obj = { _val: 0, get p() {return _val}, set p(v) {_val = v*10} }; console.log(++obj.p, " ", obj.p);
Ouch: > const arr = Uint8Array.of(255); > const x = ++arr[0]; > arr[0] 0 > x 256 Why? Chris Wellons explains: nullprogram.com/blog/2019/01…
7
23
👍 But in 2.3 handleClick should really be a data prop, not a method. The class, not the client, should be responsible for binding this. So, code as: get handleClick() {return ()=>{console.log("Clicked:" + this.name) } }
Replying to @danieldietrich
Yes, extracting methods is indeed a pitfall. My way of making sense of `this`: 2ality.com/2017/12/alternate…
3
4
The key point is that we shouldn't conflate the concepts of "data property" and "method". Except for when we are doing meta-programming
1
3
I had hoped I would get through life without every having to learn LaTeX. Unfortunately, I didn’t make it.
3
1
13
Recently saw a tweet. Paraphrased: “I want decorators so build tools can use them”. Which of course dynamic decorators don’t really support. When did TC39 last consider use case trade-offs between annotations (static metadata) and decorators. nicholasjohnson.com/blog/ann…
Sounds like we’re in agreement! Built-in decorators ftw. I want decorators to happen, and I think limiting the feature to built-in decorators is the way we’ll get there. We can always add more built-in ones over time.
1
5
Isn’t a “built-in decorator” just new language syntax that begins with a @keyword? How would the process for adding a new built-in decorator to the language be any different from the process for adding any other new syntactic extension?
Replying to @wycats
I’d love to see us investigate built-in decorators more deeply. If the JS engine knows the exact behavior, we can optimize for it. The current proposal’s unlimited flexibility, where a decorator runs arbitrary user code, is what kills optimizations.
5
3
I think I'd go with "barrel aged engineer"
I was just tagged with the most loving euphemism for “old”: tenured. “I’m looking forward to feedback from a tenured engineer.” I was touched. I think that goes on my new business cards: Tenured Software Engineer.
2
14
Been over the water fall in that barrel so many times.
2
5
JavaScript's success is as a "worse is better" (look it up) language. Adding many new features to improve it may actually be detrimental to its continued success. What it needs is slow addition of carefully considered features that enable key new use cases.
8
66
248
"Classes" are best used for modeling (understanding and implementing) the division of labor (responsibilities) among the entities within a complex application wirfs-brock.com/PDFs/013-015… wirfs-brock.com/Resources.ht…
My rule of thumb is to only make it a class when there's going to be more than one instance. ... or when I need to provide one for a framework.
1
10
Allen Wirfs-Brock retweeted
Why ECMAScript’s proposed class fields are initialized using “define” semantics, just like object literals. (a sneak preview from my work in progress history of JavaScript)
2
4
12