[Haskell-cafe] Unicode Haskell source -- Yippie!
Kyle Murphy
orclev at gmail.com
Thu Apr 24 17:27:51 UTC 2014
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. If you really like that sort of thing though you might
want to look into APL which is either famous or infamous depending on your
outlook for needing its own custom keyboard in order to write it.
-R. Kyle Murphy
--
Curiosity was framed, Ignorance killed the cat.
On Thu, Apr 24, 2014 at 1:15 PM, Rustom Mody <rustompmody at gmail.com> wrote:
> I'm mighty pleased to note that the following is valid Haskell code!
>
> Do others find this useful/appealing?
> Any possibilities on making the commented out parts work?
>
> [Pragmatics about typing this at the same speed and facility as we do with
> Ascii is a separate and (IMHO) solvable problem though its not the case at
> the moment]
>
>
> --------------------
> import qualified Data.Set as Set
> -- Experimenting with Unicode in Haskell source
>
> -- Numbers
> x ≠ y = x /= y
> x ≤ y = x <= y
> x ≥ y = x >= y
> x ÷ y = divMod x y
> x ⇑ y = x ^ y
>
> x × y = x * y -- readability hmmm !!!
> π = pi
>
> -- ⌊ x = floor x
> -- ⌈ x = ceiling x
>
> -- Lists
> xs ⤚ ys = xs ++ ys
>
> -- Bools
> x ∧ y = x && y
> x ∨ y = y || y
> -- ¬x = not x
>
>
> -- Sets
>
> x ∈ s = x `Set.member` s -- or keep ∈ for list elem?
> s ∪ t = s `Set.union` t
> s ∩ t = s `Set.intersection` t
> s ⊆ t = s `Set.isSubsetOf` t
> s ⊂ t = s `Set.isProperSubsetOf` t
> s ⊈ t = not (s `Set.isSubsetOf` t)
> -- ∅ = Set.null
>
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140424/9de2c84e/attachment.html>
More information about the Haskell-Cafe
mailing list