ECMAScript仕様輪読会 #81
前回: ECMAScript仕様輪読会 #80
Cosenseの招待リンク: https://scrapbox.io/projects/esspec/invitations/85b96c9fa718ce5185e307196ed8fb53
connpass: https://esspec.connpass.com/
Discord: https://discord.gg/59S3y6weQj
ES Spec Draft: https://tc39.es/ecma262/
multipage: https://tc39.es/ecma262/multipage/
資料: https://speakerdeck.com/syumai/ecmascriptshi-yang-wodu-munonibi-yao-nazhi-shi-daiziesutoban
読み物リスト
Twitter hashtag: #esspec
便利ツール
esspec-memo: https://tars0x9752.github.io/esspec-memo/esspec.html
Scrapbox Codeblock Generator: https://vzvu3k6k.github.io/scrapbox-codeblock/
TC39 Terminology: https://github.com/tc39/how-we-work/blob/main/terminology.md
esmeta playground: https://es-meta.github.io/playground/
時事ネタ
フロントエンドカンファレンス東京
6/28 Proposal 締め切り
JSConf
フロントエンドカンファレンス関西
自己紹介 (近況報告)
syumai syumai.icon
Twitter: https://twitter.com/__syumai GitHub: https://github.com/syumai
Go / TSを書いて暮らしてます
フロントエンドカンファレンス北海道のProposalが通ったので行ってきます
肘が治りつつある
iwatsurut
とくに、イベントもなく過ごしています。
仕事で、Go で Web システムを作ることになった。
igrep(山本悠滋)
https://github.com/igrep/
Claude CodeとNeovimを連携させるプラグインを軽く作った
https://github.com/igrep/prompt.md.vim
前回のあらすじ
https://claude.ai/share/a482efcf-eaca-4f51-b1d3-37da99ad5a0f
20:39 再開
今回のメモ
Object.prototype.__proto__
code:js
Object.defineProperty(Object.prototype, "__proto__", {value: 42,
... writable: false,})
Object: null prototype {}
{}.__proto__
42
Object.prototype.__proto__
42
delete Object.prototype.__proto__
true
Object.prototype.__proto__
undefined
Object.prototype.__proto__ = {a: 1}
{ a: 1 }
Object.prototype.a
undefined
{}.a
undefined
({}).a
undefined
Function
code:js
~/go/src/github.com/syumai/til/js/esspec81 (main ✗) cat funcs2.mjs
const f = Function("a,b", "return a+b;");
console.log(f(1, 2));
console.log(f.toString());
console.log(f.name);
~/go/src/github.com/syumai/til/js/esspec81 (main ✗) node funcs2.mjs
3
function anonymous(a,b
) {
return a+b;
}
anonymous
code:js
~/go/src/github.com/syumai/til/js/esspec81 (main ✗) cat funcs2.mjs
const AsyncFunction = (async () => {}).constructor;
const f = AsyncFunction("a,b", "return a+b;");
console.log(f(1, 2));
console.log(f.toString());
console.log(f.name);
console.log((() => {}).name);
~/go/src/github.com/syumai/til/js/esspec81 (main ✗) node funcs2.mjs
Promise { 3 }
async function anonymous(a,b
) {
return a+b;
}
anonymous
code:js
/*
* function anonymous(a,b
* ) {
* return a+b
* };
* const f = Function("a,b", "return a+b");
*/
// function anonymous(a,b,/*c
// ) {
// */){return a+b
// };
// const f = Function("a", "b", "/*c", "*/){return a+b");
// console.log(f(1, 2));
// const f = Function("a", "b", "/*c*/", "return a+b");
// const f = Function("a", "b", "//c", "d", "return a+b");
// const f = Function("a = ((() => { return 3 + 3 })())", "b = 2", "return a+b");
const f = Function("a", "b = (0", "1", "2)", "return a+b");
console.log(f.toString());
console.log(f(1)); // 3