Follow

I wish the JavaScript Map class could use buffers as keys instead of needing to convert them to strings first.

· · Web · 1 · 0 · 0

@mauve Yep, thanks JavaScript. And it's not even map's fault, running this:
const buf1 = Buffer.from([1, 2, 3]);
const buf2 = Buffer.from([1, 2, 3]);
console.log(buf1 === buf2);
Prints false!

@TheQuinbox Yeah 😅 I miss C and Rust where I can pass things by value.

Sign in to participate in the conversation
Mauvestodon

Escape ship from centralized social media run by Mauve.