Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
sicp-enjoyer
· 3y ago · 0 comments
You need both access patterns (otherwise you do a double-lookup to insert a default value) and C++ already provides both.
Comments
[–]
deredede
3y ago
Whatever is implemented by operator[] in a given language is going to be implicitly encouraged by the language, and that's what most novices will use.