[nem-en] indentation based syntax - If and why

Michal Moskal michal.moskal at gmail.com
Thu Jan 26 07:51:31 CET 2006


On 1/26/06, Piotr Kalinowski <pitkali at gmail.com> wrote:
> out of sheer curiosity I'd like to ask you: Do you use indentation
> based syntax and if so - why? Personally I know and love python along
> with its syntax. Even though I have ambivalent feelings against
> similar syntax in Nemerle - perhaps I'm simply used to braces ;)

You see, I felt the same way. Until I started actually using it :-)

It saves you typing. It saves you reading (my terminal has only 46
lines or so). It looks better.

If you want to add debug statment, it saves you typing again, example
in traditional syntax:

if (cond)
  f1 ()
else
  f2 ()

-->

if (cond) {
  log ("going to call f1");
  f1 ()
} else
  f2 ()

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



More information about the devel-en mailing list