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

@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!

Follow

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

· · Web · 0 · 0 · 0
Sign in to participate in the conversation
Mauvestodon

Escape ship from centralized social media run by Mauve.