[nem-en] loving Nemerle

Michal Moskal michal.moskal at gmail.com
Thu Oct 27 09:03:41 CEST 2005


On 10/27/05, Sean L. Palmer <seanpalmer at verizon.net> wrote:
> >Thanks! I'm also curious if people will find the indentation syntax
> >useful in Nemerle.
> >
> I thought about this recently and it seems to be more of an IDE display
> and UI issue than anything.
>
> Think about it, why can the IDE not take code like this:
>
> foo { bar { baz } } bam
>
> and display it to you as you edit, like this:
>
> foo
>      bar
>           baz
> bam
>
> but you can configure the indentation level.  Or if you really like the
> brackets, like this:
>
> foo {
>     bar {
>         baz
>     }
> }
> bam
>
> Or in fact in any other way which you find easier to edit!

It is also possible to store the program as abstract syntax trees (for
example encoded with XML), enriched with comments and similar stuff. Then
the editor could display it as the user wishes (for example some graphical
representation is also possible).

What I found problematic here is incompatibility with existing tools:
  * text editors, people used to
  * revision control systems (think about merging changes)
  * people's mindset

Otherwise it is much easier to construct wise IDEs -- you move part
of definition of what the language is to the IDE. This actually avoids
code duplication, since modern IDEs understand the languages very well
already, so there is no reason for the compiler to understand them.

So this would be probably a very good research topic, though probably
requires a lot of effort to become usable.

I once talked with a friend who had an idea to encode this way not
only programs, but also say command line arguments of Unix tools, or in
general any user interface.


--
   Michal Moskal,
   http://nemerle.org/~malekith/



More information about the devel-en mailing list