[Haskell-cafe] Unicode Haskell source -- Yippie!

Rustom Mody rustompmody at gmail.com
Sun Apr 27 11:45:54 UTC 2014


On Sat, Apr 26, 2014 at 9:28 PM, David Fox <dsf at seereason.com> wrote:

> On Thu, Apr 24, 2014 at 10:27 AM, Kyle Murphy <orclev at gmail.com> wrote:
>
>> It's an interesting feature, and nice if you want that sort of thing, but
>> not something I'd personally want to see as the default. Deviating from the
>> standard ASCII set of characters is just too much of a hurdle to usability
>> of the language.
>>
>
> On the other hand, maybe if its good enough for the entire field of
> Mathematics since forever there might be some benefit in it for us.
>

Chris spoke of his choice of Idris over Agda related to not going overboard
with unicode. The FAQ he linked to has this to say:

| And I'm sure that in a few years time things will be different and
software will
| cope better and it will make sense to revisit this. For now, however, I
would
| prefer not to allow arbitrary unicode symbols in operators.


1. I'd like to underscore the 'arbitrary'.  Why is ASCII any less arbitrary
-- apart from an increasingly irrelevant historical accident -- than
Arabic, Bengali, Cyrillic, Deseret? [Hint: Whats the A in ASCII?]  By
contrast math may at least have some pretensions to universality?

2. Maybe its a good time now to 'revisit'?  Otherwise like klunky-qwerty,
it may happen that when the technological justifications for an inefficient
choice are long gone, social inertia will prevent any useful change.


On Sun, Apr 27, 2014 at 3:00 PM, Ben Franksen <ben.franksen at online.de>wrote:

> The main problem with special Unicode characters, as I see it, is that it
> is
> no longer possible to distinguish characters unambiguously just by looking
> at them. Apart from questions of maintainability, this is also a potential
> security problem: it enables an attacker to slip in malicious code simply
> by
> importing a module whose name looks like a well known safe module. In a big
> and complex piece of software, such an attack might not be spotted for some
> time.
>

Bang on!

However the Pandora-box is already open and the creepy-crawlies are all
over us.

Witness:

GHCi, version 7.6.3: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Prelude> let а = 1
Prelude> a
<interactive>:11:1: Not in scope: `a'
Prelude>

In case you cant see it the two a's are different unicode characters:
CYRILLIC SMALL LETTER A
vs
LATIN SMALL LETTER A

Regards
Rusi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140427/9486d805/attachment.html>


More information about the Haskell-Cafe mailing list