[fpc-devel] type discussion
Micha Nelissen
micha at neli.hopto.org
Thu Jun 2 16:53:26 CEST 2005
On Thu, 02 Jun 2005 15:31:51 +0100
Jamie McCracken <jamie-junk at blueyonder.co.uk> wrote:
> Micha Nelissen wrote:
>
> > I don't understand, why are these forward declarations so evil ?
> >
>
> More code bloat, more typing and they get in the way. They dont give me
> anything useful in return.
Please show me a piece of code where they are "in the way". Code bloat? They don't cost anything in the executable.
> >>python is great I just envy *some* of its shorter syntax and it would
> >
> > Ok, some, but not this one ?
>
> Well typing begin..end all over the place isn't a lot of fun :(
Have you done maintenance yet of other people's code ?
> Especially as Im gonna have to indent them as well just to make em
> readable. So yeah it seems they are more pointless syntax bloat.
They are not pointless to me: they indicate clear structure, but we may simply differ in opinion here.
> > Sorry, the only language that does what ?
>
> var strlist : TStringlist;
> strlist := Tstringlist.create;
>
> I know strlist is a Tstringlist, the compiler knows it too as I have
> declared it so why do I have to spell it out in the creation process?
In C++:
TStringList strlist;
strlist = new TStringList;
How is that shorter ?
Micha
More information about the fpc-devel
mailing list