Re: [fpc-devel] Circular references and forward declarations

2010-01-05 Thread Vincent Snijders
Graeme Geldenhuys schreef: On 06/01/2010, Florian Klaempfl wrote: That's why we've strict private/protected. Since when is that available in FPC? I didn't know it was. You are getting old: http://www.mail-archive.com/fpc-devel@lists.freepascal.org/msg13343.html Vincent

[fpc-devel] Free Pascal Current Version in www.freepascal.org

2010-01-05 Thread Mehmet Erol Sanliturk
Current Version Version /2.2.4/ is the latest stable version the Free Pascal. Hit the download link and select a mirror close to you to download your copy. The development releases have version numbers /2.3.x/. See the development

Re[2]: [fpc-devel] Circular references and forward declarations

2010-01-05 Thread Nikolai ZHUBR
Tuesday, January 05, 2010, 11:08:37 PM, Juha Manninen wrote: > On tiistai, 5. tammikuuta 2010 20:06:42 Florian Klaempfl wrote: >> Then do the same as in C++ and put it in different include files. > Right, include files could solve this problem at least partly. They seem to be Curious enough, nobo

Re: [fpc-devel] Circular references and forward declarations

2010-01-05 Thread Graeme Geldenhuys
On 06/01/2010, Florian Klaempfl wrote: > > That's why we've strict private/protected. Since when is that available in FPC? I didn't know it was. -- Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.n

Re: [fpc-devel] Circular references and forward declarations

2010-01-05 Thread Florian Klaempfl
Graeme Geldenhuys schrieb: > On 05/01/2010, Martin Sucha wrote: >> You should be able to achieve that by putting some ifdefs around interface >> and >> implementation (and other) parts of your autogenerated programs and then for >> example > > True and I have done this before. BIG problem is t

Re: [fpc-devel] Circular references and forward declarations

2010-01-05 Thread Graeme Geldenhuys
On 05/01/2010, Martin Sucha wrote: > You should be able to achieve that by putting some ifdefs around interface and > implementation (and other) parts of your autogenerated programs and then for > example True and I have done this before. BIG problem is that class visibility goes out the window

Re: [fpc-devel] Circular references and forward declarations

2010-01-05 Thread Marco van de Voort
In our previous episode, Graeme Geldenhuys said: [ Charset UTF-8 unsupported, converting... ] > On 05/01/2010, Marco van de Voort wrote: > > > > You can only not have multiple design forms in one class, but the > > That's a limitation specific to Delphi and Lazarus. Remember a Form is > also a c

Re: Re[2]: [fpc-devel] Circular references and forward declarations

2010-01-05 Thread Graeme Geldenhuys
On 05/01/2010, JoshyFun wrote: > > interface > [...] > {$I InterfaceOnly C:\.pas} > [...] > Implementation > {$I ImplementationOnly C:\.pas} > [...] > > I think it will not include a big penalty in the parser, or maybe I'm > completly wrong ? I have done with with 100's of inclu

Re: [fpc-devel] Circular references and forward declarations

2010-01-05 Thread Graeme Geldenhuys
On 05/01/2010, Marco van de Voort wrote: > > You can only not have multiple design forms in one class, but the That's a limitation specific to Delphi and Lazarus. Remember a Form is also a class. So if you can have multiple classes in a unit, why can't you have multiple form class in a single un

Re: [fpc-devel] Circular references and forward declarations

2010-01-05 Thread Graeme Geldenhuys
On 05/01/2010, Jonas Maebe wrote: > two different units can both declare a different class with the same name > (just like they can both have global variables and procedures/functions And I would bitch-slap any developer in my team that tries that! > b) add some way to specify the unit name in

Re: [fpc-devel] Circular references and forward declarations

2010-01-05 Thread Marco van de Voort
In our previous episode, Juha Manninen said: > > You should try to separate user interface from program logic. > Do only strictly UI specific stuff in form class units. Keep program logic in > separate units (or one big separate unit :-)). > Then program logic unit can reference freely the form u

Re: [fpc-devel] Circular references and forward declarations

2010-01-05 Thread Juha Manninen
On tiistai, 5. tammikuuta 2010 19:48:39 Horacio Jamilis wrote: > In my case, my classes are defined in a form unit, so I can not have > more than 1 class per file (this is a Lazarus project)... > I know that I should have more divided the visible editing and the class > itself, and I did, with som

Re: [fpc-devel] Circular references and forward declarations

2010-01-05 Thread Vincent Snijders
Martin Sucha schreef: Hello, On Tuesday 05 January 2010 20:44:06 JoshyFun wrote: In the past I had some autogenerated pascal programs, but to include them in another unit I must manually split the files in interface and implementation. Would be possible to do something like: An example is:

Re: [fpc-devel] Circular references and forward declarations

2010-01-05 Thread Martin Sucha
Hello, On Tuesday 05 January 2010 20:44:06 JoshyFun wrote: > In the past I had some autogenerated pascal programs, but to include > them in another unit I must manually split the files in interface and > implementation. Would be possible to do something like: > > interface > [...] > {$I Interface

Re: [fpc-devel] Circular references and forward declarations

2010-01-05 Thread Juha Manninen
On tiistai, 5. tammikuuta 2010 20:06:42 Florian Klaempfl wrote: > Then do the same as in C++ and put it in different include files. Right, include files could solve this problem at least partly. They seem to be used for actual program code with FPC. Are they treated differently from Delphi's in

Re: [fpc-devel] Circular references and forward declarations

2010-01-05 Thread Juha Manninen
On tiistai, 5. tammikuuta 2010 20:58:11 Vincent Snijders wrote: > Florian Klaempfl schreef: > > Juha Manninen schrieb: > >> I think it would be EASY to implement. > > > > Then propose a patch. > > It surely would prove how easy it would be to implement. > > And if it was rejected, which I doubt,

Re: [fpc-devel] Circular references and forward declarations

2010-01-05 Thread Juha Manninen
On tiistai, 5. tammikuuta 2010 20:20:16 Jonas Maebe wrote: > It would have at least two consequences (there are undoubtedly more that > I'm not thinking of currently): a) all forward-declared types from the > interface would have to be resolved after the uses-clause in the > implementation has b

Re[2]: [fpc-devel] Circular references and forward declarations

2010-01-05 Thread JoshyFun
Hello Florian, Tuesday, January 5, 2010, 7:06:42 PM, you wrote: FK> I never looked at VirtualTreeView but I doubt that the 34k line source FK> is a language problenm. >> Programmer should have a choice to split it FK> Good languages prevent programms to do ugly things :) >> if he wants. This is

Re: [fpc-devel] Free Pascal 2.4.0 released

2010-01-05 Thread Vincent Snijders
Marco van de Voort schreef: Downloads are available at: In ftp://freepascal.stack.nl/pub/fpc/dist/2.4.0/x86_64-linux/ there are no debs for amd64. Will the fpc team provides these in the near future or do we have to wait until a fpc user will build them or until they are in debian sid? Vinc

Re: [fpc-devel] Circular references and forward declarations

2010-01-05 Thread Horacio Jamilis
El 05/01/2010 15:48, Marco van de Voort escribió: In our previous episode, Horacio Jamilis said: I need this feature too, and I like this proposed syntax. In my case, my classes are defined in a form unit, so I can not have more than 1 class per file (this is a Lazarus project)... It

Re: [fpc-devel] Circular references and forward declarations

2010-01-05 Thread Vincent Snijders
Florian Klaempfl schreef: Juha Manninen schrieb: If I create a feature request issue for this, does it have any chance of being implemented? No. I think it would be EASY to implement. Then propose a patch. It surely would prove how easy it would be to implement. And if it was rejected

Re: [fpc-devel] Circular references and forward declarations

2010-01-05 Thread Marco van de Voort
In our previous episode, Horacio Jamilis said: > I need this feature too, and I like this proposed syntax. > > In my case, my classes are defined in a form unit, so I can not have > more than 1 class per file (this is a Lazarus project)... It's perfectly possible to have more than 1 class per fi

Re: [fpc-devel] Circular references and forward declarations

2010-01-05 Thread Florian Klaempfl
Jonas Maebe schrieb: > On 05 Jan 2010, at 17:45, Juha Manninen wrote: > >> On tiistai, 5. tammikuuta 2010 18:14:53 Jonas Maebe wrote: >>> The reason that they are conceptually not the same thing is that >>> in Pascal two different units can both declare a different class >>> with the same name (ju

Re: [fpc-devel] Circular references and forward declarations

2010-01-05 Thread Jonas Maebe
On 05 Jan 2010, at 17:45, Juha Manninen wrote: > On tiistai, 5. tammikuuta 2010 18:14:53 Jonas Maebe wrote: >> The reason that they are conceptually not the same thing is that in >> Pascal two different units can both declare a different class with the >> same name (just like they can both have g

Re: [fpc-devel] Circular references and forward declarations

2010-01-05 Thread Florian Klaempfl
Juha Manninen schrieb: On tiistai, 5. tammikuuta 2010 19:16:25 Florian Klaempfl wrote: See e.g. the compiler, but how does a big source file hurt anyways? Today, navigation is done by the IDE and cvs times are also gone when big files were a problem to commit. I consider class reference refering

Re: [fpc-devel] Circular references and forward declarations

2010-01-05 Thread Juha Manninen
On tiistai, 5. tammikuuta 2010 19:16:25 Florian Klaempfl wrote: > See e.g. the compiler, but how does a big source file hurt anyways? > Today, navigation is done by the IDE and cvs times are also gone when > big files were a problem to commit. I consider class reference refering > some external fil

Re: [fpc-devel] Circular references and forward declarations

2010-01-05 Thread Horacio Jamilis
El 05/01/2010 13:07, Juha Manninen escribió: Why is it not allowed from another unit? They are conceptually the same thing! The problem could be solved easily if there was a forward declaration saying: TMyClass = class; defined in "MyUnit.pas" I need this feature too, and I like this pro

Re: [fpc-devel] Circular references and forward declarations

2010-01-05 Thread Florian Klaempfl
Juha Manninen schrieb: On tiistai, 5. tammikuuta 2010 18:39:21 Florian Klaempfl wrote: I knew all the reasoning, but honestly, I don't see a point in it. I used C++ for years professionally and I always avoided circular references/implementing classes in different files than the header is named

Re: [fpc-devel] Circular references and forward declarations

2010-01-05 Thread Juha Manninen
On tiistai, 5. tammikuuta 2010 18:39:21 Florian Klaempfl wrote: > I knew all the reasoning, but honestly, I don't see a point in it. I > used C++ for years professionally and I always avoided circular > references/implementing classes in different files than the header is > named so I see no need i

Re: [fpc-devel] Circular references and forward declarations

2010-01-05 Thread Marco van de Voort
In our previous episode, Jonas Maebe said: > There might be other solutions (maybe some kind of class-specific > namespace support), but it would definitely require some more language > features rather than merely accepting anonymous class definitions > anywhere. Otherwise the type checking i

Re: [fpc-devel] Circular references and forward declarations

2010-01-05 Thread Juha Manninen
On tiistai, 5. tammikuuta 2010 18:14:53 Jonas Maebe wrote: > On 05 Jan 2010, at 17:07, Juha Manninen wrote: > > Forward declaration of a class is allowed inside a unit. There can > > be a > > reference to a class before it is defined! Like: > > TMyClass = class; > > > > Why is it not allowed from

Re: [fpc-devel] Circular references and forward declarations

2010-01-05 Thread Florian Klaempfl
Juha Manninen schrieb: > On tiistai, 5. tammikuuta 2010 18:07:38 Florian Klaempfl wrote: >> Juha Manninen schrieb: >>> If I create a feature request issue for this, does it have any chance of >>> being implemented? >> No. > > Well thanks, that was a quick answer. According to timestamp you answere

Re: [fpc-devel] Circular references and forward declarations

2010-01-05 Thread Juha Manninen
On tiistai, 5. tammikuuta 2010 18:07:38 Florian Klaempfl wrote: > Juha Manninen schrieb: > > If I create a feature request issue for this, does it have any chance of > > being implemented? > > No. Well thanks, that was a quick answer. According to timestamp you answered my mail before I sent it!

Re: [fpc-devel] Circular references and forward declarations

2010-01-05 Thread Jonas Maebe
On 05 Jan 2010, at 17:07, Juha Manninen wrote: Forward declaration of a class is allowed inside a unit. There can be a reference to a class before it is defined! Like: TMyClass = class; Why is it not allowed from another unit? They are conceptually the same thing! The reason that they a

Re: [fpc-devel] Circular references and forward declarations

2010-01-05 Thread Florian Klaempfl
Juha Manninen schrieb: > > If I create a feature request issue for this, does it have any chance of > being > implemented? No. > I think it would be EASY to implement. Then propose a patch. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org

[fpc-devel] Circular references and forward declarations

2010-01-05 Thread Juha Manninen
Hello. My proposal: Please allow a forward declaration of a class which is defined in another unit, maybe using a new syntax for the declaration. Alternatively, allow circular references just like other programming languages do. Forbidden circular references is a major annoyance in Object Pasca

[fpc-devel] custom ThreadManager and MemoryMutexManager for hard realtime

2010-01-05 Thread Stefan Kisdaroczi
hi, to create hard realtime linux programs with freepascal and xenomai [1] in userspace I'm installing a custom ThreadManager and a MemoryMutexManager on program init like this: SetThreadManager( XenoThreadManager ); SetMemoryMutexManager( XenoMemoryMutexManager ); This worked until 2.2.4.