[fpc-pascal] Syntax changes suggestions

R0b0t1 r030t1 at gmail.com
Mon Jul 16 19:55:04 CEST 2018


On Mon, Jul 16, 2018 at 6:40 AM, Santiago A. <svaa at ciberpiula.net> wrote:
> I have some suggestions of change to freepascal syntax, just to debate
>
> (All are backward compatible)
>
> - Declaring variables inside blocks, and loop variables

Declarations inside blocks I am unable to support. Declarations as
loops I *might* be able to support, but once you go from a C-like
language to Pascal and get used to predeclaring variables it starts to
become nice. You don't have to figure out where things are.

> - Autofree pointers

Useful but it looks like this will not be a base language feature.

> - Try except finally blocks

I can support this one, I am surprised it is not already supported.
Wasn't this mentioned in another recent thread as existing? Does it
exist in at least Delphi mode?

> - Private declarations in implementation
>

Typically you should "hide" things in either a private class method or
in method variables.


FPC is already lacking in some major ways compared to Delphi. The main
one I can think of is anonymous functions. If anyone could implement
that the community would benefit immensely.

I've looked, on and off, but not been able to make a lot of progress.

Cheers,
     R0b0t1



More information about the fpc-pascal mailing list