Re: [fpc-devel]Proposal for audo-destructors

2004-09-21 Thread Nico Aragón
Hello, On Mon, 20 Sep 2004 00:37:44 +0600, "Yakov Sudeikin" <[EMAIL PROTECTED]> wrote: >You can just take the source code and do what you want with it and release it as >AragonPascal or whatever. Thank you for your interest. But I'm writting something more alike a text editor than a compiler.

Re: [fpc-devel]Proposal for audo-destructors

2004-09-20 Thread Florian Klaempfl
Yakov Sudeikin wrote: I would really appreciate some comments on my question about patches that would implement "optional", "unofficial" or "pluggable" features. I would like very much to be able to build extensions for particular idioms. I understand that not everybody will like this possibility.

Re: [fpc-devel]Proposal for audo-destructors

2004-09-20 Thread Florian Klaempfl
[EMAIL PROTECTED] wrote: Hello. Absence of automatic construction/destruction of classes is very painfull and it can significantly degrade the development process (i.e. smart pointers and RAII are impossible). It's one of the greatest flaws of Pascal relatevly to C (the second thing are Templ

Re: Re: [fpc-devel]Proposal for audo-destructors

2004-09-19 Thread Yakov Sudeikin
>I would really appreciate some comments on my question about patches >that would implement "optional", "unofficial" or "pluggable" features. >I would like very much to be able to build extensions for particular >idioms. I understand that not everybody will like this possibility. >The question is i

Re: [fpc-devel]Proposal for audo-destructors

2004-09-13 Thread KJK::Hyperion
At 14.58 12/09/2004, you wrote: procedure CopyFile(SourceFileName, TargetFileName: string); auto s, t: TStream; begin s := TFileStream.Create(SourceFileName, fmOpenRead); t := TFileStream.Create(TargetFileName, fmCreate); t.CopyFrom(s); end; what do you think about t

Re: [fpc-devel]Proposal for audo-destructors

2004-09-12 Thread Nico Aragón
Hello, On Sun, 12 Sep 2004 18:45:53 +0200 (CEST), [EMAIL PROTECTED] (Marco van de Voort) wrote: >> Would it be feasible to write a different parser that outputs some >> intermediate format to pass to code generator? > >It would boil down to rewriting most of the compiler, except the real >assembl

Re: [fpc-devel]Proposal for audo-destructors

2004-09-12 Thread Marco van de Voort
> The problem actualy is not in automated destructors, > but in that the Class > types are actually pointers in Delphi OO model. That > IS the hack, that makes some > tasty stuff impossible (RAII) Afaik RAII is simply that automated stuff is guaranteed finalised in a predicatable time? (unlike e

Re: [fpc-devel]Proposal for audo-destructors

2004-09-12 Thread Nico Aragón
Hello, On Sun, 12 Sep 2004 20:38:52 +0400, [EMAIL PROTECTED] wrote: >>Again, what if you assign T to a global var or a >class member ? >> >>Why would you want to do that? >> >>You still can declare "var T: MyClass" if you plan to >use T as a local >>reference. Obviously you only declare variabl

Re: [fpc-devel]Proposal for audo-destructors

2004-09-12 Thread Marco van de Voort
> On Sun, 12 Sep 2004 17:38:22 +0200 (CEST), "Peter Vreman" > <[EMAIL PROTECTED]> wrote: > > >Plugin support for the parser is impossible, everything is too much > >dependent on other parts. Only assembler/linker etc. could maybe made an > >plugin. > > Would it be feasible to write a different pa

Re: [fpc-devel]Proposal for audo-destructors

2004-09-12 Thread netsurfer
>Again, what if you assign T to a global var or a class member ? > >Why would you want to do that? > >You still can declare "var T: MyClass" if you plan to use T as a local >reference. Obviously you only declare variables as automatic when you >want to bind its lifecycle to the current procedure

Re: [fpc-devel]Proposal for audo-destructors

2004-09-12 Thread Nico Aragón
Hello, On Sun, 12 Sep 2004 17:38:22 +0200 (CEST), "Peter Vreman" <[EMAIL PROTECTED]> wrote: >Plugin support for the parser is impossible, everything is too much >dependent on other parts. Only assembler/linker etc. could maybe made an >plugin. Would it be feasible to write a different parser tha

Re: [fpc-devel]Proposal for audo-destructors

2004-09-12 Thread Nico Aragón
Hello, On Sun, 12 Sep 2004 15:56:07 +0200 (CEST), [EMAIL PROTECTED] (Marco van de Voort) wrote: >> procedure CopyFile(SourceFileName, TargetFileName: string); >> var >> s, t: TStream; >> begin >> s := TFileStream.Create(SourceFileName, fmOpenRead); >> try >> t :=

Re: [fpc-devel]Proposal for audo-destructors

2004-09-12 Thread Peter Vreman
>>The matter has been discussed several times by the FPC core group, at >> great >>length. No satisfying solution on which everyone agreed was reached. > > I would really appreciate some comments on my question about patches > that would implement "optional", "unofficial" or "pluggable" features. >

Re: [fpc-devel]Proposal for audo-destructors

2004-09-12 Thread Nico Aragón
Hello, On Sun, 12 Sep 2004 15:28:40 +0200 (CEST), [EMAIL PROTECTED] wrote: >> > procedure CopyFile(SourceFileName, TargetFileName: string); >> > auto >> > s, t: TStream; >> > begin >> > s := TFileStream.Create(SourceFileName, fmOpenRead); >> > t := TFileStream.Create(Targe

Re: [fpc-devel]Proposal for audo-destructors

2004-09-12 Thread Jonas Maebe
On 12 sep 2004, at 15:56, Marco van de Voort wrote: I guess it's much alike to what happens with AnsiStrings. Ansistrings don't work with exceptions. Sure they do, that's why you can turn them off using {$IMPLICITEXCEPTIONS OFF}. The same goes for class constructors afaik (which is why we turn th

Re: [fpc-devel]Proposal for audo-destructors

2004-09-12 Thread Marco van de Voort
> On Sun, 12 Sep 2004 13:07:24 +0200 (CEST), [EMAIL PROTECTED] (Marco van > de Voort) wrote: > > procedure CopyFile(SourceFileName, TargetFileName: string); > var > s, t: TStream; > begin > s := TFileStream.Create(SourceFileName, fmOpenRead); > try > t := TFileStr

Re: [fpc-devel]Proposal for audo-destructors

2004-09-12 Thread Michael . VanCanneyt
On Sun, 12 Sep 2004, Vincent Snijders wrote: > Nico Aragón wrote: > > > Hello, > > > > On Sun, 12 Sep 2004 13:07:24 +0200 (CEST), [EMAIL PROTECTED] (Marco van > > de Voort) wrote: > > > > > >>>Absence of automatic construction/destruction of > >>>classes is very painfull and it can signific

RE: [fpc-devel]Proposal for audo-destructors

2004-09-12 Thread Kalabukhov Alex
Do you need second C++ with pascal syntax? :) Auto-destructors? It's very simple!!! :) (**) unit uGC; interface type IAutoObject = interface function GetObject: TObject; property AObject: TObject read GetObject; end; TAutoObjec

Re: [fpc-devel]Proposal for audo-destructors

2004-09-12 Thread Vincent Snijders
Nico Aragón wrote: Hello, On Sun, 12 Sep 2004 13:07:24 +0200 (CEST), [EMAIL PROTECTED] (Marco van de Voort) wrote: Absence of automatic construction/destruction of classes is very painfull and it can significantly degrade the development process (i.e. smart pointers and RAII are impossible). Ve

Re: [fpc-devel]Proposal for audo-destructors

2004-09-12 Thread Nico Aragón
Hello, On Sun, 12 Sep 2004 13:07:24 +0200 (CEST), [EMAIL PROTECTED] (Marco van de Voort) wrote: >> Absence of automatic construction/destruction of >> classes is very painfull and it can significantly >> degrade the >> development process (i.e. smart pointers and RAII are >> impossible). > >Ve

Re: [fpc-devel]Proposal for audo-destructors

2004-09-12 Thread Nico Aragón
Hello, On Sun, 12 Sep 2004 13:02:52 +0200, Marc Weustink <[EMAIL PROTECTED]> wrote: >> Procedure Something; >> Var T:tMyClass;Auto; >> Begin <- T auto created here >> ... >> If ... Then Exit; <- T auto destructed here >> ... >> End;<- T auto destructed here >> >> P.P.S. The

Re: [fpc-devel]Proposal for audo-destructors

2004-09-12 Thread Marco van de Voort
> Absence of automatic construction/destruction of > classes is very painfull and it can significantly > degrade the > development process (i.e. smart pointers and RAII are > impossible). Very painfull is a bit exaggerated :-) > It's one of the greatest flaws of Pascal relatevly to C (the seco

Re: [fpc-devel]Proposal for audo-destructors

2004-09-12 Thread Marc Weustink
At 08:42 12-9-2004, [EMAIL PROTECTED] wrote: Hello. Absence of automatic construction/destruction of classes is very painfull and it can significantly degrade the development process (i.e. smart pointers and RAII are impossible). It's one of the greatest flaws of Pascal relatevly to C (the second