I'm a Portuguese native speaker, and use a US keyboard with the US International layout (the pt keyboard layout is terrible for programming). Having dead keys for Portuguese diacritics is basically essential, but I do occasionally need to type things in other languages where I have no clue how to input the diacritics. The macOS input method makes it possible to input those characters in a predictable, easy to remember way.