caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* accented letters in identifiers
@ 2007-03-07 22:38 michel levy
  2007-03-07 22:40 ` [Caml-list] " Martin Jambon
  0 siblings, 1 reply; 6+ messages in thread
From: michel levy @ 2007-03-07 22:38 UTC (permalink / raw)
  To: caml-list

I read in the manual :
The current implementation (except on MacOS 9) also recognizes as 
letters all accented characters from the ISO 8859-1 (“ISO Latin 1”) set.
But on ocaml 3.09.3 I have
#let à = 1;;
Illegal character (\160)

is it now impossible to use the accented characters ?
-- 
Michel Levy
36 rue George Sand
38400 Saint Martin d'Heres


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Caml-list] accented letters in identifiers
  2007-03-07 22:38 accented letters in identifiers michel levy
@ 2007-03-07 22:40 ` Martin Jambon
  2007-03-07 22:59   ` Martin Jambon
  0 siblings, 1 reply; 6+ messages in thread
From: Martin Jambon @ 2007-03-07 22:40 UTC (permalink / raw)
  To: michel levy; +Cc: caml-list

On Wed, 7 Mar 2007, michel levy wrote:

> I read in the manual :
> The current implementation (except on MacOS 9) also recognizes as
> letters all accented characters from the ISO 8859-1 (?ISO Latin 1?) set.
> But on ocaml 3.09.3 I have
> #let à = 1;;
> Illegal character (\160)
>
> is it now impossible to use the accented characters ?

Yes. Here the problem is the non-breakable space between "à" and "="
which is character 160.


Martin

--
Martin Jambon
http://martin.jambon.free.fr


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Caml-list] accented letters in identifiers
  2007-03-07 22:40 ` [Caml-list] " Martin Jambon
@ 2007-03-07 22:59   ` Martin Jambon
  2007-03-08 10:00     ` Mattias Engdegård
  2007-03-08 21:11     ` Martin Jambon
  0 siblings, 2 replies; 6+ messages in thread
From: Martin Jambon @ 2007-03-07 22:59 UTC (permalink / raw)
  To: Martin Jambon; +Cc: michel levy, caml-list

On Wed, 7 Mar 2007, Martin Jambon wrote:

> On Wed, 7 Mar 2007, michel levy wrote:
>
> > I read in the manual :
> > The current implementation (except on MacOS 9) also recognizes as
> > letters all accented characters from the ISO 8859-1 (?ISO Latin 1?) set.
> > But on ocaml 3.09.3 I have
> > #let à = 1;;
> > Illegal character (\160)
> >
> > is it now impossible to use the accented characters ?
>
> Yes. Here the problem is the non-breakable space between "à" and "="
> which is character 160.

I mean no. It is possible to use latin1 accents.

[but I think it's best to avoid them in general and use pseudo-English
identifiers]


Martin

--
Martin Jambon
http://martin.jambon.free.fr


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Caml-list] accented letters in identifiers
  2007-03-07 22:59   ` Martin Jambon
@ 2007-03-08 10:00     ` Mattias Engdegård
  2007-03-08 21:10       ` Richard Jones
  2007-03-08 21:11     ` Martin Jambon
  1 sibling, 1 reply; 6+ messages in thread
From: Mattias Engdegård @ 2007-03-08 10:00 UTC (permalink / raw)
  To: martin.jambon, caml-list, michel.levy

>I mean no. It is possible to use latin1 accents.
>
>[but I think it's best to avoid them in general and use pseudo-English
>identifiers]

For published code, certainly, but in general I think it is for the
programmer to decide. After all, not using our native language makes
us stupider, and using familiar names for identifiers can be important
when teaching programming.

What I have against the OCaml lexer is that it chops off the diacritics,
so that smörgårdsbord == smorgardsbord. This may work in French, but
is completely wrong in Swedish where o and ö are two completely
different letters. (Accent-sensitivity might be a good idea for French
as well, as it would enforce consistency.)

And latin-1 is a bit quaint these days; it's not even enough for French.
Let's support utf-8! Apart from being vastly more linguistically
inclusive, it would allow us scientific programmers to use Greek letters.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Caml-list] accented letters in identifiers
  2007-03-08 10:00     ` Mattias Engdegård
@ 2007-03-08 21:10       ` Richard Jones
  0 siblings, 0 replies; 6+ messages in thread
From: Richard Jones @ 2007-03-08 21:10 UTC (permalink / raw)
  To: caml-list

On Thu, Mar 08, 2007 at 11:00:31AM +0100, Mattias Engdegård wrote:
> And latin-1 is a bit quaint these days; it's not even enough for French.
> Let's support utf-8! Apart from being vastly more linguistically
> inclusive, it would allow us scientific programmers to use Greek letters.

Yes, UTF-8 please!

Perl has allowed UTF-8 for quite a few years now - eg. you can have
functions with Chinese or Japanese names.

Of course it's not directly backwards-compatible with existing files,
but I'm sure a compiler flag could sort that out.

Rich.

-- 
Richard Jones
Red Hat


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Caml-list] accented letters in identifiers
  2007-03-07 22:59   ` Martin Jambon
  2007-03-08 10:00     ` Mattias Engdegård
@ 2007-03-08 21:11     ` Martin Jambon
  1 sibling, 0 replies; 6+ messages in thread
From: Martin Jambon @ 2007-03-08 21:11 UTC (permalink / raw)
  To: Martin Jambon; +Cc: michel levy, caml-list

On Wed, 7 Mar 2007, Martin Jambon wrote:

> On Wed, 7 Mar 2007, Martin Jambon wrote:
>
> > On Wed, 7 Mar 2007, michel levy wrote:
> >
> > > I read in the manual :
> > > The current implementation (except on MacOS 9) also recognizes as
> > > letters all accented characters from the ISO 8859-1 (?ISO Latin 1?) set.
> > > But on ocaml 3.09.3 I have
> > > #let à = 1;;
> > > Illegal character (\160)
> > >
> > > is it now impossible to use the accented characters ?
> >
> > Yes. Here the problem is the non-breakable space between "à" and "="
> > which is character 160.
>
> I mean no. It is possible to use latin1 accents.

Just a small correction after exchanging of few emails with the OP: there
may be problems with the terminal configuration. When the configuration is
right (iso-8859-1/15 charset + some other settings), accents work in
the interactive ocaml interpreter.


Martin

--
Martin Jambon
http://martin.jambon.free.fr


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-03-08 21:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-07 22:38 accented letters in identifiers michel levy
2007-03-07 22:40 ` [Caml-list] " Martin Jambon
2007-03-07 22:59   ` Martin Jambon
2007-03-08 10:00     ` Mattias Engdegård
2007-03-08 21:10       ` Richard Jones
2007-03-08 21:11     ` Martin Jambon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).