Re: Factory Pattern



On Sun, 29 Jul 2007 00:54:34 -0700, Maciej Sobczak wrote:

On 28 Lip, 00:23, "Randy Brukardt" <ra...@xxxxxxxxxxxxxx> wrote:

(New standards for other languages also will have to add
this sort of support, or take their chances at having their standards fail.)

When I think about it more, I cannot even believe it might be true.
Consider... C. It has the ISO standard and surely will be revised.

One of the things that are taken for granted in the whole industry is
the fact that C names are immediately "extern" without any further
tweaking. Thanks to this you can write

pragma Import (C, Puts, "puts");

and gain access to the standard puts function in C. Or any other.
*Every* programming language that is even remotely useful uses this
fact and relies on it.

Now imagine that C introduces support for Unicode in names. In order
to reuse the whole existing infrastructure of binary utilities (the
tradition that is hard to drop) it would be necessary to introduce
name mangling that will translate Unicode identifiers into something a
typical linker can understand. But that will not be standardized,
leading to complete mess. The alternative would be to require that the
whole world starts to understand Unicode in symbol names for linking
and import/export. The implications for the industry would be
disastrous.

My humble opinion: there will be no Unicode allowed for C identifiers
and the binary symbol names will stay Latin1 (or even a subset of it)
till the end of the world as we know it. This means that ISO cannot
have any reasonable mandate to enforce Unicode support on other
languages without the risk of undermining its credibility by being
inconsistent.

Am I missing something?

Hmm, AFAIK both C and C++ always mangled external names:

"_puts" not "puts" in C.

"??00puts@t346§$____§&G_Fsdf..." in C++.

Usability is nobody's care, anyway. Just try to link Borland C++ to a MSVC
import library, you'll see.

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
.



Relevant Pages

  • Re: Microsoft Layer for Unicode on Windows 95/98/Me systems
    ... > Yes,>some<, but no upper case to lower case conversion etc. ... > and Unicode support is installed on the OS. ... >> either font-dependent or are defined by the Unicode standard. ...
    (microsoft.public.vb.winapi)
  • Re: Factory Pattern
    ... It has the ISO standard and surely will be revised. ... Now imagine that C introduces support for Unicode in names. ... and the binary symbol names will stay Latin1 ...
    (comp.lang.ada)
  • Re: Most Komplex Kanji ?
    ... But those aren't the reasons you post ... >> in unicode. ... > support every language on the planet in a single standard. ...
    (sci.lang.japan)
  • Re: AfxMessageBox?
    ... next version of the standard. ... I know there are some smart guys, big names, working to add better Unicode ... support in the standard. ... I certainly don't mind ...
    (microsoft.public.vc.mfc)
  • compile error on alpha - binutils problem?
    ... {standard input}:246: Error: macro requires $at register while noat in effect ... # PCCARD support ...
    (Linux-Kernel)