It's because `a` is not a pointer to the result of badfunc; it is a copy. So the return value of `badfunc` might be overwritten if func2 is non-trivial, but the copy will not.
I think that when you find arguments that GC can be competitive with manual memory management, they always rely on the assumption that it is in the context of idiomatic code. For a GC language, idiomatic code allows the use of a generational collector which can automatically operate in a manner similar to an arena allocator. I suppose this is a matter of opinion, but I think that using arena allocators in a language like c++ is not strictly idiomatic - you should only add them when you find they are required for optimisation, and they have a cognitive overhead. If you make the wrong choice with your arena allocator then either you can make performance worse or you can introduce memory safety problems.
So this is the way that a GC might be competitive with manual memory management - if the benefit of arena-like allocation offsets the additional tracing performed by the GC.
Absolutely, but I think the "in most cases" of the original quote was meant to imply simple malloc/free style memory management rather than the use of tailored arena/region allocators.
As far as it goes I think it is a pretty fair statement. However it is important to know of other decisions in the language which make it easier for the GC. Particularly, the use of tagged values and a GIL. Tagging makes it simpler to distinguish heap values from other values, and the GIL means that the GC does not need to operate concurrently.
To get :cd to behave more like vim, you could add https://github.com/gbarta/evil-noautochdir which in addition to behaving like :set noautochdir, also allows :cd to take an argument the vim way.
Relating to #3, if you expect to be overseas long term and you are in a situation where foreign tax credit will cover your US tax liability, it can be advantageous to use the foreign tax credit instead of the FEIE even if your income is less than the ~100k FEIE limit. This is because the unused credit can be rolled forward and used as a buffer for cases where you do something tax-advantaged in your country of residence which is not honoured by the IRS. Most commonly this could be capital gains on the sale of a primary residence which is tax-free in many countries but only partially so in the US. But there are many other such possibilities, like retirement savings not covered by totalization agreements, special treatment for redundancy payouts, lump sum retirement payments, etc. There is this general idea that tax agreements eliminate double taxation, but they only do so imperfectly because the legislation is tailored for people temporarily working overseas, not people who make their home overseas.
These cases are perhaps not relevant to the typical digital nomad when they set out, but things happen and you may choose not to return to the US. In those cases, it is good to have chosen to file your taxes in a way that maximises future choices.
In my view the FEIE should only be used if you KNOW you will go back to the US soon and want the easier filing it provides, or if your foreign tax credit is simply not enough.