Your choice of approximation in the Java case reflects your own view; there is a "final" in Pike too which maps better to Javas "final".
What approximation would you choose to reflect your view then?
About "final" in Pike, I wasn't aware of that. Using "final constant" seems to solve half the problem (the larger half). It doesn't make it possible to create a different constant with the same name in a subclass though.
If it wasn't clear earlier, I regard "constant" as a way to declare something that is like a function in almost all respects except for the type. With that view, "constant" has very clean semantics in Pike, and it's just as useful for overloading as functions are.
Yes, but "something which is almost like a function" isn't really what you'd normally associate with the word "constant". You'd rather think "something which is almost like a #define". The fact that the bug in the type checker which was the start of this thread has appeared is a clear indication that my intuition isn't unique.
Why do we need something which is "almost like a function" anyway? Why not just use a function? To save some typing?