正在加载视频...

视频加载失败

Here's why the Records and Tuples proposal died, and how Composites might solve it. I did my homework for this one - I interviewed Ashley Claymore, the Composites TC39 champion. And I'm really proud of how it turned out. I'd love any feedback you can give me, and I'll...

21,342 次观看 • 1 年前 •via X (Twitter)

11 条评论

Artem Zakharchenko 的头像
Artem Zakharchenko1 年前

@acutmore What we really need is "====" to compare otherwise incomparable objects by value 😅

Josh Durham🔋 Influencer Marketing 的头像
Josh Durham🔋 Influencer Marketing1 年前

Last Quarter for @hexclad my team generated 74 Million Organic impressions, the best part? This is 7 X what we did last year, and it was all through free product. Here's some thought on how we accomplished this. #1 Compounding Impressions Compounding impressions is the 8th wonder of the world. We have been doing influencer outreach for nearly 3 years now. We started in chef creators as the target demo and only expanded outward from there. The same creators who posted 3 years ago are posting now. It's a beautiful thing when you have a great product. #2 Inbound 3 years ago Hexclad didn't have the reputation it does now. As Hexclad's credibility has grown, so has the amount of creators who want to work with them. Our optin rate on outreach is SUPER high, as well as the amount of creators applying on their own. #3 Product Use Cooking is hands down the best category to run influencer marketing. The pans, aprons, hexmills etc are all things that can easily be included in every post for creators posting Recipes. It's not uncommon for the average creator seeded to post 7+ times. This is just a better set than sending another face moisturizer.

const name = 'David'; 的头像
const name = 'David';1 年前

@acutmore This is a great breakdown of the whole situation

Justin Chase 的头像
Justin Chase1 年前

I suppose I do a double map in those cases Map<string, Map<string, unknown>>, but that gets more unwieldy as you have a larger composite key. Deno KV seems to make you build an array of primitives which I think they end up encoding in native code but that seems to solve it the problem of the unordered keys you would have on objects.

Artem Zakharchenko 的头像
Artem Zakharchenko1 年前

Wait, but if composites aren't compared by value, you wouldn't be able to use them as map keys at the current stage, right? I'm also curious if this isn't stemming mostly out of the need to grab *the same * object reference. Is that truly such a big problem in practice? I've used WeakMap plenty of time where I would associate a value with an object (e.g. a Request instance). You associate by reference, not value, so it doesn't suffer from property re-ordering issue (I can update the `request` I used as a key and it will still work). WeakMap also automatically nukes references if the key gets garbage-collected, which is nice (and something your regular Map doesn't do). The only "downside" of WeakMap is that you have to work a bit differently with it than you do with a map.

Bradley Farias 的头像
Bradley Farias1 年前

@acutmore I think eventually it will look more like a between state of the current proposal and

Engid 的头像
Engid1 年前

@acutmore Why'd they choose to call it "composites"?

Matt Pocock 的头像
Matt Pocock1 年前

@acutmore What would you call it?

Nicholas Shanks 的头像
Nicholas Shanks1 年前

@acutmore He might be biased though.

Matt Pocock 的头像
Matt Pocock1 年前

@acutmore Lol what

Nicolas Ramirez 的头像
Nicolas Ramirez1 年前

@acutmore Hey Matt, love that you are back doing more TS content!

相关视频