/.../ and most of the time there shouldn't be any error. (Right?)
There could be applications that throw some errors fairly frequently, so speed can't be ignored. Anyway, with the option to resort to the err->is_my_error variety, the type comparisons can always be avoided when performance is very important.
I can also point out that since the type checker in pike implements the "looks-like" philosophy (i.e. no inherit relation is necessary), all thrown error classes should include a unique is_foo_error constant. Otherwise two completely unrelated error could happen to be typewise compatible.
A combination could work too, so you can put the declaration at "try" once and for all if you're in that mood,
Possible, but I'm not sure it's worth the proliferation in syntax varieties just to save a little bit of typing. To that end I suggest to start only with the syntax where the declaration is in each catch clause and extend with the other one later on if people find it really annoying.
If the typesystem can't support this, however, the branch of discussion goes to the bitbucket. :)
Indeed. I leave that to the undisputed authority on the pike type system, namely Grubba. ;)