레코드 및 튜플 제안도 그렇고 어째서 JavaScript는 동등성 연산을 커스텀하게 구현할 수 있게 하지 않고 변죽만 울릴까? Symbol.equality
랑 Symbol.hash
같은 거 정해주고 Map
이든 Set
이든 내부적으로 그거 쓰게 하면 좋을 것 같은데.
@hongminhee洪 民憙 (Hong Minhee) 그러게요.
Map
Set
에 대해서만 Symbol.equality
등을 사용하는 동작만 추가하면 breaking change도 전혀 없네요.
If you have a fediverse account, you can quote this note from your own instance. Search https://hackers.pub/ap/notes/019656ff-a24e-711e-92d7-0aed96d1ce43 on your instance and quote it. (Note that quoting is not supported in Mastodon.)