I press ⌥ + 8 for square brackets and SHIFT + 8 for parentheses.
It's probably not possible to find better alternatives that could be used for a language based on Lisp syntax.
The keyboard simply doesn't have any dedicated keys that are not used for normal text. (Except @ on Mac keyboards, but Windows keyboards require a combination for that)
The ergonomic of \{X} is exactly the same on it as on my carbon x1, my keychron tls and four other keyboards I happen to have in my drawer.
Are You using modified Apple II like Rebecca Heineman or some kind of super small keyboard that looks like someone forgot to put all the keys in :) ?
Either way its on you not Java.
(Dont take this wrong way - this is an honest question - here in Poland almost all keyboard are backslash friendly and I would live to knowe where this is not the case)
So the Mac issue applies to 4 countries in the Nordics at least. Please note that traditional PC keyboards use a different layout for some characters and may in some cases have a dedicated key for backslash too.
Regarding backslashes and other special characters, I never said it's on Java specifically, but the US centric culture in general. K&R used curly brackets when they designed Cbecause they fit the US teletype character set of the 60s/70s, but that doesn't mean it's the best choice today.
Do You have some specific way of template definition in mind that You think would work here?
And what about curly brackets, especially in context of templates, what would you use instead?
It's actually made worse because { and } also need special combinations.
To type \{X} I need to press
I know this is something we need to live with due to historical reasons, but I would prefer that new syntax is made simpler.