not a question, just a fun thing with syntax_tools

Chris Pressey cpressey@REDACTED
Wed May 21 23:34:52 CEST 2003


On Wed, 21 May 2003 14:01:51 -0400
Vance Shipley <vances@REDACTED> wrote:

> The vi/emacs religious wars aside ..
> 
> Im my humble opinion exposing the emacs specific (and broken) way
> of indenting is just plain wrong.  The source shouldn't be tied to
> the editor.  That's just obvious.

In more ways than one - programs aren't linear!

But if you try to improve on it, say by introducing a 2D notation, you
risk tying the source to an obscure, custom editor - ends up much worse
than simply declaring an arbitrary text editor, like say, emacs, as
official.

So, I'll bet we'll still be using text files to represent program source
code in 2081.  What the world could use is a brilliantly clever editor
that can display the source in any number of arrangements as determined
by the essential structure of the program.

I think Gabriel touched on this in 'Patterns in Software' - if you say
  a(X) -> b(c(X)).
and the optimizer and the editor both 'know' this, then you should be
able to see and/or type a(X) and b(c(X)) interchangeably while working
on your program.  For example, have some key binding that switches
between the 'collapsed' and 'expanded' forms, kind of like the +/-
buttons in the 'tree view' in most modern GUIs.  I would love this.

It could also help the situation Joe rants about in his Why OO Sucks
article - it doesn't matter where data declarations really "are", so
long as the programmer can choose to see them all in one place, or
individually, as they choose, and so long as the compiler knows where to
find them...

> Indentation should be done with tabs, that should be obvious.

Tabs are the work of the devil.  Repent, sinner.  :)

-Chris



More information about the erlang-questions mailing list