@randomwizard@social.vivaldi.net
Post #2933575
2026-05-21 17:10 UTC
javascript bugs me more than it should. I guess it is because I have to write in javascript from time to time. Today I am particularly annoyed with how to make hashes.
In perl
%hash
In python
{}
In lua
{}
In Ruby
{}
BUT in javascript it is
new Map()
which they only introduced in 2015. Before that, people used objects which are instantiated with {} , but the objects have a bunch of other junk attached to them which makes it harder to reliably use in all circumstances. So, if you just want a hash, plain old data and nothing else it is
new Map()
and it pains me every time I have to type that out.
Replies (0)
No replies.