How do you think about the flooding of bracket?

BLS lietz at wanadoo.fr
Thu Jun 15 06:26:51 PDT 2006


Hi Hasan,
using  {}      instead of          begin end                   is more a
matter of taste. Since I am comming form Oberon/Modula i prefer (of course)
the last one, but I think using {} in D is more a political
decision.(convincing Cpp and Java nerds) . I think D respective Walter has
borrowed some ideas from the Wirth s languages family, let us name the
module concept , nestested functions just to name some items. So what makes
me wonder that the enclosing concept,  is not part of D.
a simple  example from Modula 2:

Module  Primes;
FROM InOut IMPORT Writeln, ......;

  PROCEDURE abc
  ...
     PROCEDURE xyz
        ....
    END xyz
  ....
  END abc
END  Primes

Have a look at then END declarations: I found them quit usefull and the code
more readable, at least in deep nested functions. But perhaps :
int xyz()
{
}xyz
looks a bit too strange. <g>
Just my 2 cents
Bjoern.

"Hasan Aljudy" <hasan.aljudy at gmail.com> schreef in bericht
news:e6rhq4$1ce3$1 at digitaldaemon.com...
> I think technically these { things } are called curly braces.
> I love them. 100x times better than begin end. IMO, they make
> function/class bodies standout.
> >





More information about the Digitalmars-d mailing list