comp.lang.ada
 help / color / mirror / Atom feed
From: Georg Bauhaus <bauhaus+rm.tsoh@maps.futureapps.de>
Subject: Re: Factory Pattern
Date: Sun, 29 Jul 2007 12:53:47 +0200
Date: 2007-07-29T12:53:48+02:00	[thread overview]
Message-ID: <1185706427.8471.29.camel@sonnenregen> (raw)
In-Reply-To: <1185695674.206091.43870@w3g2000hsg.googlegroups.com>

On Sun, 2007-07-29 at 00:54 -0700, Maciej Sobczak wrote:
> On 28 Lip, 00:23, "Randy Brukardt" <ra...@rrsoftware.com> 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.

This does right now depend on the combination of tools, unfortunately.
However, names across languages are being considered in new language
revisions and are aware of Unicode (or ISO 10646).


> Now imagine that C introduces support for Unicode in names.

No need to imagine things, as Unicode inclusion has already happened.
There are also C compilers and C++ compilers documenting how
to use Unicode identifiers, and their users report sucess
(I think a D compiler with Unicode support is available, too).

"WG14/N1124 Committee Draft — May 6, 2005 ISO/IEC 9899:TC2

"6.4.2 Identifiers

"3 Each universal character name in an identifier shall
designate a character whose encoding in ISO/IEC 10646 falls
into one of the ranges specified in annex D. [60]

"[60] On systems in which linkers cannot accept extended
characters, an encoding of the universal character
name may be used in forming valid external identifiers.
For example, some otherwise unused character or sequence
of characters may be used to encode the \u in a universal
character name.
Extended characters may produce a long external identifier.

"Annex D
(normative)
Universal character names for identifiers

1 This clause lists the hexadecimal code values that are
valid in universal character names in identifiers."



Roughly the same wording is found for C++ in 
http://www.open-std.org/jtc1/sc22/open/n2356/
Annex E



> Am I missing something?

I think yes. Unicode identifiers are already allowed, though not by
every compiler. Linker tools are standardizing on mangling rules.
The rules are more programmer friendy in that they can use names that
many systems can use, for example UTF-8 names (UTF-8 has been around
in final form since 1992, see the interesting remarks by Rob Pike in
http://www.cl.cam.ac.uk/~mgk25/ucs/utf-8-history.txt )

Character set representations have been differing around the globe
and within one country and between machines. This isn't surprising
when there are competing computers, and languages that are different
between nations (thinking of EBCDIC, Sun SPARC, 
embedded and mobile computers in Japan, Korea, 香港 (Hong Kong) ...).






  parent reply	other threads:[~2007-07-29 10:53 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-25 18:19 Factory Pattern shaunpatterson
2007-07-25 18:28 ` Martin
2007-07-25 18:51 ` Dmitry A. Kazakov
2007-07-25 21:06   ` Georg Bauhaus
2007-07-25 19:27 ` Matthew Heaney
2007-07-26  0:51 ` Jeffrey R. Carter
2007-07-26  6:44   ` Maciej Sobczak
2007-07-26  8:40     ` Georg Bauhaus
2007-07-26  9:53       ` Dmitry A. Kazakov
2007-07-26 11:01         ` Georg Bauhaus
2007-07-26 13:02           ` Maciej Sobczak
2007-07-26 13:44             ` Dmitry A. Kazakov
2007-07-26 14:58             ` Georg Bauhaus
2007-07-26 22:31             ` Randy Brukardt
2007-07-27 13:07               ` Maciej Sobczak
2007-07-27 14:23                 ` shaunpatterson
2007-07-27 22:23                 ` Randy Brukardt
2007-07-28 18:56                   ` Maciej Sobczak
2007-07-29  7:54                   ` Maciej Sobczak
2007-07-29  8:53                     ` Dmitry A. Kazakov
2007-07-29 10:53                     ` Georg Bauhaus [this message]
2007-07-26 16:58         ` Adam Beneschan
2007-07-29 11:38         ` Manuel Gomez
2007-07-27 10:16     ` Jeffrey R. Carter
2007-07-27 12:47       ` Maciej Sobczak
2007-08-26  7:18         ` David Thompson
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox