Whilst Java's ArrayList overallocates by 50%: https://stackoverflow.com/a/14129344/509706 I'm surprised to learn that Python only overallocates lists by ~12.5%: https://github.com/python/cpython/blob/3.6/Objects/listobject.c#L49
I was not expecting such a range of values!
miniblog.
Related Posts
I've released difftastic 0.68! A smaller update, but still worth upgrading:
* Improved Bash, C, Go, Lua, Nix, Perl, Python, Rust, Scala, Swift and YAML parsing.
* Minor display and git compatibility fixes.
Writing type params with <> (e.g. List<Int>) seems the most natural to me: probably because I encountered that syntax first.
Between C++, Java and TypeScript I think it's the most common too.
List[Int] seems to be next most common (Scala, Python) but TIL Gleam uses List(Int)!
Playing with optional type signatures in Python, I realise that the return type is the most important to me.
I'd much rather have a function with only a return type instead of a function with only parameter types. It's often quick to add too.

