[fpc-pascal] What to do to get new users
Marcos Douglas B. Santos
md at delfire.net
Sun Nov 17 14:40:56 CET 2024
On Sun, Nov 17, 2024 at 9:57 AM Sven Barth via fpc-pascal
<fpc-pascal at lists.freepascal.org> wrote:
>
> Am 16.11.2024 um 16:42 schrieb Marcos Douglas B. Santos via fpc-pascal:
> > "anonymous procedures" now
> > exist and can also be declared "anywhere";
>
> You didn't get the important part of the feature then. The important
> part is less the anonymous function, but the function reference. That
> you can have a function capture state from within the function and then
> have that state leave the function. Unlike Delphi FPC can also pass
> nested functions to function references, so if you don't like anonymous
> functions you can still benefit from this feature by utilizing nested
> functions together with function references.
I understand that the important part is about function references. However,
anonymous functions don’t align with the spirit of the Pascal language, so
I wrote about that.
But now you’ve made it clear that I can also pass nested functions to
function references, which is great—a language evolution without breaking
its philosophy.
> > - simplifying the naming conventions of units; using something like
> > "lazarus.blablabla" and "fpc.blablabla" and leaving the main system
> > units with names without prefixes;
>
> No. That affects backwards compatibility. Not gonna happen. Which is
> also why the 3.4.0 release which will support both non-namespaced and
> namespaced units (for Delphi compatibility) will be available in both
> flavors. At least for the major platforms.
I’m completely in favor of maintaining backwards compatibility—that’s one
of the reasons I’ve continued developing in Object Pascal year after year.
What I meant, however, is that it can be challenging to maintain code
(libraries,
compiler, etc.) just to ensure backwards compatibility.
Wouldn’t it be easier to keep a simpler compiler and libraries rather than
having conditionals and modes to accommodate everything and everyone?
It would be up to the developer to decide whether it’s worth migrating an
entire project to the new compiler version or keeping it on the same version
(but one that is already stable, works, and still allows them to update their
project normally over the years).
> > - how about allowing the same AS in unit declarations so we can do
> > something like [unit MyUnitWithABigName AS MyUnit] and then use
> > [MyUnit.TSomeClass] — this can already be done with MACROS, so it
> > would be simple to implement in the language, right?
>
> That alone shows that you have no clue how the compiler works...
I don't.
I’m not a compiler developer. I just thought it would be "easy" to implement
something that’s already possible with a MACRO. I’m sorry if it seemed like
I was saying implementing something in the compiler is easy.
I guess we all know it’s not.
best regards,
Marcos Douglas
More information about the fpc-pascal
mailing list