[fpc-pascal] wiki down again?

2012-08-21 Thread Chadisko
is the freepascal wiki down again? greetings -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/wiki-down-again-tp5710880.html Sent from the Free Pascal - General mailing list archive at Nabble.com. ___ fpc-pascal

[fpc-pascal] How to avoid namespace name clashes after USES ?

2012-08-21 Thread Timothy Madden
Hello As the language is currently specified, an identifier is searched in, and used from, the last unit in the USES clause that exposes that identifier. As some might know already, this exposes the user to future compatibility problems, stemming from the fact that the USES clause imports and

Re: [fpc-pascal] wiki down again?

2012-08-21 Thread Vincent Snijders
2012/8/20 Chadisko konradchrist...@googlemail.com: is the freepascal wiki down again? It is working OK now. Vincent ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] How to avoid namespace name clashes after USES ?

2012-08-21 Thread Jonas Maebe
On 20 Aug 2012, at 18:15, Timothy Madden wrote: This story is inspired from a real case when *lots* of user code suddenly stopped compiling after JDK 1.2 was released, with a new List class, which users had to import from a different package until JDK 1.1. In this case is wasn't even a

Re: [fpc-pascal] Searching for files all over the disk

2012-08-21 Thread Jürgen Hestermann
Am 2012-08-21 00:00, schrieb Bart: My Delphi projects are located like this: ... As Juha has pointed out, this is a general way projects are organized. Realy? How do you know? That's just an assumption. But my complain was more general about an increasing use of branch scanning (not only

Re: [fpc-pascal] Searching for files all over the disk

2012-08-21 Thread Mattias Gaertner
On Tue, 21 Aug 2012 10:59:41 +0200 Jürgen Hestermann juergen.hesterm...@gmx.de wrote: Am 2012-08-21 00:00, schrieb Bart: My Delphi projects are located like this: ... As Juha has pointed out, this is a general way projects are organized. Realy? How do you know? That's just an

Re: [fpc-pascal] Searching for files all over the disk

2012-08-21 Thread Jürgen Hestermann
Am 2012-08-21 00:55, schrieb Juha Manninen: About scanning only paths specified by the user, do you really mean the user should search for pascal sources in a to-be-converted Delphi project directories, then type the directory names into a config file and then feed that file to the

Re: [fpc-pascal] Searching for files all over the disk

2012-08-21 Thread Jonas Maebe
Hi, Please move this discussion to the fpc-other or Lazarus list, thanks. Jonas FPC mailing lists admin ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] How to avoid namespace name clashes after USES ?

2012-08-21 Thread DaWorm
Very tedious, but you could create a wrapper unit and/or class for each library, and expose a prefixed name instead of the original. Jeff, On Aug 21, 2012 3:31 AM, Jonas Maebe jonas.ma...@elis.ugent.be wrote: On 20 Aug 2012, at 18:15, Timothy Madden wrote: This story is inspired from a real

[fpc-pascal] Re: How to avoid namespace name clashes after USES ?

2012-08-21 Thread Timothy Madden
On 08/21/2012 10:30 AM, Jonas Maebe wrote: On 20 Aug 2012, at 18:15, Timothy Madden wrote: This story is inspired from a real case when *lots* of user code suddenly stopped compiling after JDK 1.2 was released, with a new List class, which users had to import from a different package until

[fpc-pascal] Re: How to avoid namespace name clashes after USES ?

2012-08-21 Thread Timothy Madden
On 08/21/2012 02:17 PM, DaWorm wrote: Very tedious, but you could create a wrapper unit and/or class for each library, and expose a prefixed name instead of the original. Very ingeniuos, I believe this is as close to a solution as I can get for now. But there are still a few probles I can

Re: [fpc-pascal] Re: How to avoid namespace name clashes after USES ?

2012-08-21 Thread Jorge Aldo G. de F. Junior
I am trying hard to think of a situation where unit prefixes are not enough, but its hard to see. 2012/8/21 Timothy Madden terminato...@gmail.com: On 08/21/2012 02:17 PM, DaWorm wrote: Very tedious, but you could create a wrapper unit and/or class for each library, and expose a prefixed name

Re: [fpc-pascal] Re: How to avoid namespace name clashes after USES ?

2012-08-21 Thread Jorge Aldo G. de F. Junior
With no error messages, or even with no changes to the program since 1 and a half year in the repository, the scientific calculations are now all blown up, and program outputs only errors at runtime. The maintainer now curses and chases me for having the nerve to leave a program known as working

Re: [fpc-pascal] Re: How to avoid namespace name clashes after USES ?

2012-08-21 Thread Marco van de Voort
In our previous episode, Timothy Madden said: Very ingeniuos, I believe this is as close to a solution as I can get for now. But there are still a few probles I can see: - there is no way to prefix symbols within a unit, that I know of. Some languages related to pascal and maybe even

Re: [fpc-pascal] Re: How to avoid namespace name clashes after USES ?

2012-08-21 Thread Sven Barth
Am 21.08.2012 14:10, schrieb Jorge Aldo G. de F. Junior: With no error messages, or even with no changes to the program since 1 and a half year in the repository, the scientific calculations are now all blown up, and program outputs only errors at runtime. The maintainer now curses and chases me

Re: [fpc-pascal] Re: How to avoid namespace name clashes after USES ?

2012-08-21 Thread Jorge Aldo G. de F. Junior
I already know that you can fully qualify, i believe you misread my post. Its not that common to have name colisions if you use prefixes like i said. I cant see how the added complexity of full name space support would help pascal in that regard. 2012/8/21 Sven Barth

Re: [fpc-pascal] Re: How to avoid namespace name clashes after USES ?

2012-08-21 Thread Sven Barth
Am 21.08.2012 15:13, schrieb Jorge Aldo G. de F. Junior: I already know that you can fully qualify, i believe you misread my post. Its not that common to have name colisions if you use prefixes like i said. I cant see how the added complexity of full name space support would help pascal in

Re: [fpc-pascal] How to avoid namespace name clashes after USES ?

2012-08-21 Thread Marcos Douglas
On Mon, Aug 20, 2012 at 1:15 PM, Timothy Madden terminato...@gmail.com wrote: Hello As the language is currently specified, an identifier is searched in, and used from, the last unit in the USES clause that exposes that identifier. As some might know already, this exposes the user to future

Re: [fpc-pascal] Network mutex

2012-08-21 Thread Jorge Aldo G. de F. Junior
You could implement such a thing using my Pascal-Actor-Model classes. Simple TCP streams (or UDP with added guarantees) and a central actor that decides who use what. http://code.google.com/p/pascal-actor-model/ theres an udp sender/receiver actor that share a socket to send and receive

[fpc-pascal] Re: How to avoid namespace name clashes after USES ?

2012-08-21 Thread Timothy Madden
On 08/21/2012 06:06 PM, Marcos Douglas wrote: On Mon, Aug 20, 2012 at 1:15 PM, Timothy Madden terminato...@gmail.com wrote: [...] Is there any form of proposal or some alternative to the USES clause, that will keep all the imported symbol names qualified by some namespace name or by some

[fpc-pascal] Re: How to avoid namespace name clashes after USES ?

2012-08-21 Thread Timothy Madden
On 08/21/2012 03:10 PM, Jorge Aldo G. de F. Junior wrote: With no error messages, or even with no changes to the program since 1 and a half year in the repository, the scientific calculations are now all blown up, and program outputs only errors at runtime. The maintainer now curses and chases

Re: [fpc-pascal] Re: How to avoid namespace name clashes after USES ?

2012-08-21 Thread Marcos Douglas
On Tue, Aug 21, 2012 at 1:29 PM, Timothy Madden terminato...@gmail.com wrote: On 08/21/2012 06:06 PM, Marcos Douglas wrote: On Mon, Aug 20, 2012 at 1:15 PM, Timothy Madden terminato...@gmail.com wrote: [...] Is there any form of proposal or some alternative to the USES clause, that will

Re: [fpc-pascal] Re: How to avoid namespace name clashes after USES ?

2012-08-21 Thread Marcos Douglas
On Tue, Aug 21, 2012 at 1:43 PM, Timothy Madden terminato...@gmail.com wrote: On 08/21/2012 03:10 PM, Jorge Aldo G. de F. Junior wrote: With no error messages, or even with no changes to the program since 1 and a half year in the repository, the scientific calculations are now all blown up,

Re: [fpc-pascal] Re: How to avoid namespace name clashes after USES ?

2012-08-21 Thread Mark Morgan Lloyd
Timothy Madden wrote: But next year, some unit I use will have reached a new version, and if I merely recompile my program I have already have a conflict, that was not there last year. I'd suggest that the first thing to do is to document in each unit what version of the compiler it's tested

Re: [fpc-pascal] How to avoid namespace name clashes after USES ?

2012-08-21 Thread Marco van de Voort
In our previous episode, Marcos Douglas said: I proposed this sintaxe: uses my_long_unit_name as my; begin my.proc(); end This doesn't protect any better, since the new unit might also define my. ___ fpc-pascal maillist -

Re: [fpc-pascal] How to avoid namespace name clashes after USES ?

2012-08-21 Thread Marcos Douglas
On Tue, Aug 21, 2012 at 3:08 PM, Marco van de Voort mar...@stack.nl wrote: In our previous episode, Marcos Douglas said: I proposed this sintaxe: uses my_long_unit_name as my; begin my.proc(); end This doesn't protect any better, since the new unit might also define my. True, but

[fpc-pascal] wrong definition of SHCreateStdEnumFmtEtc() in unit shlobl

2012-08-21 Thread Bernd
While implementing an OLE dragdrop source I stumbled over this: shlobj.pp, Line 2444 function SHCreateStdEnumFmtEtc(cfmt:UINT; afmt:array of TFORMATETC; var ppenumFormatEtc:IEnumFORMATETC):HRESULT;StdCall;external External_library name 'SHCreateStdEnumFmtEtc'; this must be wrong. I got

Re: [fpc-pascal] How to avoid namespace name clashes after USES ?

2012-08-21 Thread Jorge Aldo G. de F. Junior
Instead of implementing the half-assed C++ namespace model, just add to the compiler a warning when it detects that there is a collision in the current scope (two functions with the same parameters from different units that can be called from the scope being inspected). I believe function overload

[fpc-pascal] TSQLDBLibraryLoader committed for SQLDB

2012-08-21 Thread Michael Van Canneyt
Hi, After recent discussions about which library to load when loading DB client libraries, I changed the default names for Firebird, MySQL, Postgres. araminta: ./loadlibdemo list Available connection types: Firebird, Default library name: libfbclient.so.2.5 MySQL 4.0, Default library name:

Re: [fpc-pascal] How to avoid namespace name clashes after USES ?

2012-08-21 Thread Marcos Douglas
On Tue, Aug 21, 2012 at 4:42 PM, Jorge Aldo G. de F. Junior jagf...@gmail.com wrote: 2012/8/21 Marcos Douglas m...@delfire.net: On Tue, Aug 21, 2012 at 3:08 PM, Marco van de Voort mar...@stack.nl wrote: In our previous episode, Marcos Douglas said: I proposed this sintaxe: uses

Re: [fpc-pascal] How to avoid namespace name clashes after USES ?

2012-08-21 Thread Marcos Douglas
On Tue, Aug 21, 2012 at 5:19 PM, Marcos Douglas m...@delfire.net wrote: On Tue, Aug 21, 2012 at 4:42 PM, Jorge Aldo G. de F. Junior jagf...@gmail.com wrote: 2012/8/21 Marcos Douglas m...@delfire.net: On Tue, Aug 21, 2012 at 3:08 PM, Marco van de Voort mar...@stack.nl wrote: In our previous

Re: [fpc-pascal] How to avoid namespace name clashes after USES ?

2012-08-21 Thread Jorge Aldo G. de F. Junior
the alias is the fully qualified function name : myunit1.function1() myunit2.function2() you dont need alias, cause you cant have two units with the same name, so you have two different fully qualified function names. The warning would simply point out that there are two functions with the same

[fpc-pascal] Re: How to avoid namespace name clashes after USES ?

2012-08-21 Thread leledumbo
Requiring all functions to be allways fully qualified will make the most commom case worse than current implementation just to be better for the uncommon case. This is a step back, not forward... Indeed, and the way unit system works has an advantage: changing entry order / entry name in the

Re: [fpc-pascal] How to avoid namespace name clashes after USES ?

2012-08-21 Thread Marcos Douglas
On Tue, Aug 21, 2012 at 6:29 PM, Jorge Aldo G. de F. Junior jagf...@gmail.com wrote: the alias is the fully qualified function name : myunit1.function1() myunit2.function2() Yes, we know.. you dont need alias, cause you cant have two units with the same name, so you have two different

Re: [fpc-pascal] Re: How to avoid namespace name clashes after USES ?

2012-08-21 Thread Marcos Douglas
On Tue, Aug 21, 2012 at 10:23 PM, leledumbo leledumbo_c...@yahoo.co.id wrote: Requiring all functions to be allways fully qualified will make the most commom case worse than current implementation just to be better for the uncommon case. This is a step back, not forward... Indeed, and the way