Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2026-02

Does compiler itself support namespace files

6 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Unknown author

Hi. As the title says really. :)

How strict is the fpc team about naming convensions in the <fpc-src>/compiler/ directory? Could namespace (dotted files) be used inside that directory?

I see FPC is starting to use it in the FCL code, which is nice.

On a side note:
I know compiler/dbg*.pas are debugger code, but then there is also "dwarfbase.pas", which I guess should technically be renamed to dbgdwarfbase.pas - if the naming convension should strictly be followed?

Regards,
Graeme

Reply by email

Sven Barth
to Unknown author

mailinglists--- via fpc-pascal schrieb am
Do., 19. Feb. 2026, 00:54:

Show quoted text 6 lines
Hi. As the title says really. :) How strict is the fpc team about naming convensions in the <fpc-src>/compiler/ directory? Could namespace (dotted files) be used inside that directory?

Especially the prefixes *should* match the intended functionality. And dotted unit names shall not be used.

I see FPC is starting to use it in the FCL code, which is nice.

Using them in the FCL does not mean using them inside the compiler.

Show quoted text 6 lines
On a side note: I know compiler/dbg*.pas are debugger code, but then there is also "dwarfbase.pas", which I guess should technically be renamed to dbgdwarfbase.pas - if the naming convension should strictly be followed?

Probably. But then again DWARF can also be used for non debug related functionality like exceptions...
That said renaming just for sake of renaming isn't worth the effort.

Regards,
Sven

Reply by email

Sven Barth
to Unknown author

mailinglists--- via fpc-pascal schrieb am
Do., 19. Feb. 2026, 09:44:

Show quoted text 5 lines
On 2026-02-19 07:03, Sven Barth via fpc-pascal wrote: > > Especially the prefixes *should* match the intended functionality. And > dotted unit names shall not be used.

And if you add new units please adhere to the coding style of the compiler: https://wiki.freepascal.org/Coding_style
I know the style is not everyone's tea (I don't like it either), but especially for new code it should be adhered to. There might be some cases that are not yet fully documented, so feel free to ask back.

A propos: for asking compiler or RTL development related questions the fpc-devel list would be more appropriate. ;)

Regards,
Sven

Reply by email

Unknown author
to Sven Barth
Sven Barth wrote
And if you add new units please adhere to the coding style of the compiler: https://wiki.freepascal.org/Coding_style

😢 Such compact code syntax - it's like we're back in the 80's with 80x24 monitors. LOL

No worries, I'll update my code. Thanks for pointing that out.

A propos: for asking compiler or RTL development related questions the fpc-devel list would be more appropriate. ;)

Totally forgot about that one. Done. Thanks Sven.

Regards,
- Graeme -

Reply by email

Steve Litt
to Unknown author

mailinglists--- via fpc-pascal said on Thu, 19 Feb 2026 14:17:31 +0000

Show quoted text 6 lines
On 2026-02-19 10:18, Sven Barth via fpc-pascal wrote: > And if you add new units please adhere to the coding style of the > compiler: https://wiki.freepascal.org/Coding_style 😢 Such compact code syntax - it's like we're back in the 80's with 80x24 monitors. LOL

Two spaces per indent level? You've got to be kidding me. I want indentation to be obvious at a glance. I think three spaces per indent is the minimum, and I could make a pretty good argument for four.

My thought is that if my code starts getting 5 or 6 indents deep, I need to refactor.

SteveT

Steve Litt

http://444domains.com

Reply by email