[fpc-devel] type discussion
jamie-junk at blueyonder.co.uk
Thu Jun 2 16:31:51 CEST 2005
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.
> Garbage collection is largely no issue when using the Owner concept in TComponent, using TObjectList, etc.
True and thats why I suggested ref counting Tobjects only so that no
manual memory management is required. I tend to make heavy use of TList,
Tstringlist and TFilestream objects so I cant do everything with
>>and a richer framework has made them switch to the dark side. We need
>>to fight back!
> Ok, but richer framework simply needs people adding packages and useful units to freepascal :-).
>>>Python is hard to read, especially if multiple blocks are closed at
>>>once, then it's hard to see what block a line belongs to (because of
>>>missing 'end' or '}').
>>not true because of the indenting (use bigger indents!). Im not saying
> Bigger indents cause the text to go too wide. More functions also help, I agree.
>>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 :(
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.
>>>I also don't like the magic. For example the 'mystrings.create;'
>>>example you mentioned, it's *totally* not consistent with regular
>>>syntax: mystrings.create means call "TStringList.Create" on the
>>>object pointed to by the mystrings variable.
>>Well pascal in the only mainstream langugae that does that - I dont
>>see the pont and it aint magic.
> 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?
More information about the fpc-devel