3 ms·
Do you propose that things have the same name, even when the meaning is different? Some of these functions change the string in-place (C), and others return a
by ken 14y ago
Do you propose that things have the same name, even when the meaning is different?
Some of these functions change the string in-place (C), and others return a new string (Objective-C). Some languages have both options (Lisp), while others can't because strings are immutable (Python). Some languages define strings as arrays of characters, and others have some other opaque array-like structure made up of characters, and others have no concept of a character at all (just "length-1 strings"). And so on.
The biggest differences between languages are not names, but semantics. My editor will happily remind me of the proper name in any language, but that's the least of my worries since I've got to mentally shift gears anyway. The algorithm I write for different kinds of strings can be completely different.
I'm reminded of a similar issue with GUIs a few years back, when Redhat (I think) made themes to unify the look of GNOME and KDE, even though they still worked differently. The conclusion reached was that they should have unified the behavior first (always a good thing), rather than unifying the appearance first (which led to more confusion).
But that could be a problem for programming languages, since these differences are pretty fundamental.