[Haskell] Beyond ASCII only editors for Haskell
Mads Lindstrøm
mads_lindstroem at yahoo.dk
Sun May 22 15:52:12 EDT 2005
Jesper Louis Andersen wrote:
> Mads Lindstrøm wrote:
>
> > But if I were to specify a program (in a non-executable language) or if
> > I were to write some function on a blackboard, I would not be restricted
> > to only ASCII characters. For example, I would not write 'sqrt 2' but I
> > would write a square root symbol with 2 underneath. Likewise, I would
> > not write '2 ^ 5', but I would write a 2 with a 5 raised upwards to the
> > right of the 2. Then why are we stuck with the mono-spatial ASCII based
> > editors in Haskell? Why is it not possible to make Haskell program look
> > similar to ordinary math? (also when writing those programs and not just
> > afterward in some Latex formatted paper).
>
> While the idea is intriguing, it has actually been done. Look up APL as
> a language. Once, there were special terminals, able to enter
> APL-specific symbols only used in APL. You might be lucky your local
> computer museum has one (I cannot frankly remember if they have one in
> Denmark).
Newer heard of these terminals before, but they do sound interesting.
Atleast for historical reasons.
But, it is less important how easy it is to write code than how easy it
is to read it, as code will be read 10 times more than writen. If you
think this is untrue, think about how many times you have already read
you own code before anybody else gets to see it. For example, you make
funciton X and a little later you make function Y which uses X. Now it
is not unlikely that you go read function X again to see what it
actually did. And when you make the next function you might look at X
and Y again. And so on...
My point is that we should not to care so much about how fast we can
write the code (with speciel kind of terminals or otherwise), but how
easy it is to read.
> ASCII has the advantage of being de-facto. UTF-8 might change that, as
> might XML, but I am not sure if this is an advantage at all. Apart from
> mathematical conciseness and reabability, nothing is gained by the
> change. On the contrary, you have limited yourself to a small number of
> editors which are able to read your program, unless you translate down
> to an ASCII variant.
Conciseness and readability is very important, as it affects how fast
you can comprehend others or you own source code.
But we do not have to leave out ASCII based editors - atleast to begin
with. You can be showing functions like sqrt using real math symbol and
at the same time store your documents as ordinary Haskell sources, which
can be read by any editor. This would of cause require the editor to
have a faily big understanding of the Haskell language. And it can only
go so far, some math stuff will require richer formats that cannot be
translated nicely to ordinary Haskell sources.
>
> I do not think one can learn from APL. The world is much changed today.
> However, programming in diagrams and the like sounds awfully like
> CASE-tools of the start of the nineties - which did not prevail either.
>
> It might be the world is ready for another attempt with XML+UTF-8 though.
>
--
Mads Lindstrøm <mads_lindstroem at yahoo.dk>
More information about the Haskell
mailing list