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

[fpc-devel]Proposals for IDE and language

2004-09-12 Thread netsurfer
Proposals for IDE 1) FP IDE dosn't allow to save classes chart to a file or even copy it as text to clipboard. Having a classes chart for compiled code sometimes is of great use. 2) Besides simple text search & replace it would be convinient to have some tools for making simple code r

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]Generic Types in FPC

2004-09-12 Thread Peter Vreman
> According to Robert Love's blog Delphi will provide generic types > support. Will FPC support the feature in the same way? > > Delphi Syntax for Generic Types will be: > > type > TFoo = class > private >data1: T; > public > function SomMethod(param1: INteger; Param2 :T) : Integer; >

[fpc-devel]Generic Types in FPC

2004-09-12 Thread rstar
According to Robert Love's blog Delphi will provide generic types support. Will FPC support the feature in the same way? Delphi Syntax for Generic Types will be: type TFoo = class private data1: T; public function SomMethod(param1: INteger; Param2 :T) : Integer; end; function TFoo.SomeMe

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]Translation language file: danish

2004-09-12 Thread Jonas Maebe
On 12 sep 2004, at 11:10, Christian Iversen wrote: parser_e_generic_methods_only_in_methods=03072_E_methods can be only in other methods called direct with type identifier of the class I don't know what this one means either. From the source of the compiler, it seems this message is written out i

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

Re: [fpc-devel]Translation language file: danish

2004-09-12 Thread Tomas Hajny
From: Christian Iversen <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Subject:[fpc-devel]Translation language file: danish Send reply to: [EMAIL PROTECTED] Date sent:

[fpc-devel]Translation language file: danish

2004-09-12 Thread Christian Iversen
Evening all. To day ago, I got bored, and so I wrote a danish language file for fpc :) I just need a little help before it's complete. The meaning of the following entries escape me: parser_e_generic_methods_only_in_methods=03072_E_methods can be only in other methods called direct with type