meta_pixel
Tapesearch Logo
Log in
Syntax - Tasty Web Development Treats

Hasty Treat - Records and Tuples in JavaScript

Syntax - Tasty Web Development Treats

Wes Bos

Tech News, News, Technology

4.9 • 1.2K Ratings

🗓️ 28 September 2020

⏱️ 17 minutes

🧾️ Download transcript

Summary

In this Hasty Treat, Scott and Wes talk about records and tuples in javascript — what they are, why you might want to use them, and more! LogRocket - Sponsor LogRocket lets you replay what users do on your site, helping you reproduce bugs and fix issues faster. It’s an exception tracker, a session re-player and a performance monitor. Get 14 days free at logrocket.com/syntax. Show Notes ??? - 02:42 - Immutability 05:08 - Records Immutable object Syntax #{x: 1, y: 2} 05:56 - Tuples Immutable array Syntax #[1,2,3,4] 07:18 - For both Referred to as a compound primitive Can contain only primitives, not objects They are compared deeply by their contents rather than their identity assert(#{ a: 1 } === #{ a: 1 }); assert(#[1, 2] === #[1, 2]); assert(#{ a: 1, b: 2 } === #{ b: 2, a: 1 }); Potential for optimizations Optimizations for making deep equality checks fast Optimizations for manipulating data structures Works well with type systems Better integration with the debugger Accessed through normal record.scott object like syntax 13:39 - Stage 2 Links https://github.com/tc39/proposal-record-tuple Tweet us your tasty treats! Scott’s Instagram LevelUpTutorials Instagram Wes’ Instagram Wes’ Twitter Wes’ Facebook Scott’s Twitter Make sure to include @SyntaxFM in your tweets

Transcript

Click on a timestamp to play from that location

0:00.0

Monday, Monday, Monday,

0:02.0

Open wide Dev fans.

0:04.0

Get ready to stuff your face

0:06.0

with JavaScript, CSS, node modules, barbecue tips,

0:09.0

get workflows,

0:10.0

break dancing, soft skills, web development,

0:12.0

the hastiest, the craziest, the craziest development the hastiest the craziest the tastiest web development treats coming in hot here is

0:18.1

Wes Barracuda bars and Scott El Toroloco, Tolinsky.

0:25.0

Welcome to Syntax.

0:28.0

In this Monday, hasty treat, we are going to be talking all about records and

0:32.2

tuples in JavaScript

0:34.8

and what they are, why you might need to know about them

0:37.4

and what their status is because they're coming

0:40.6

and they're gonna be really, really cool, allow us to do some stuff that we've wanted to do in

0:44.5

JavaScript for a long time and really will help some of those situations where you want data

0:51.2

to be the same thing all the time.

0:53.8

So my name is Scott Selinsky.

0:55.4

I'm a full stack developer from Denver, Colorado.

0:58.1

And with me, as always, is the West Boss.

1:00.0

Hey, Wes, and this episode is sponsored by Log Rocket to know you're going to want to check out Log Rocket because it's one of those service that is just totally cool and it's totally different than what you're used to and you can head over to log rocket.com

1:13.1

forward slash syntax to check it out now what is this well lock rocket is an

1:16.8

error and exception handling service to the less you see the errors and bugs happen in

...

Please login to see the full transcript.

Disclaimer: The podcast and artwork embedded on this page are from Wes Bos, and are the property of its owner and not affiliated with or endorsed by Tapesearch.

Generated transcripts are the property of Wes Bos and are distributed freely under the Fair Use doctrine. Transcripts generated by Tapesearch are not guaranteed to be accurate.

Copyright © Tapesearch 2026.