[fpc-pascal] Syntax changes suggestions

Sven Barth pascaldragon at googlemail.com
Thu Jul 26 10:29:26 CEST 2018


R0b0t1 <r030t1 at gmail.com> schrieb am Do., 26. Juli 2018, 09:53:

> On Mon, Jul 23, 2018 at 11:11 AM, Ryan Joseph
> <ryan at thealchemistguild.com> wrote:
> >
> >
> >> On Jul 22, 2018, at 4:54 AM, Sven Barth via fpc-pascal <
> fpc-pascal at lists.freepascal.org> wrote:
> >>
> >> And that's why there are people who *do* care about it. Of course you
> can put everything and the kitchen think into a language. But if it doesn't
> fit the language than you'll simply end up with a melting pot that doesn't
> feel coherent. Also while people might not consciously think about the
> spirit of the language I think they'll feel if the language is coherent
> with itself or not.
> >
> > The spirit of the language is really hard to define in my opinion. I
> think we all agree that if we changed begin/end to {} we would all be
> offended but why again is “auto” not in the spirit of the language? It
> looks like Pascal to me. Calling Free at the end of blocks and inside
> destructors feels like Pascal to me.
> >
> > Telling the compiler to call it for me by typing “auto” instead of
> “Free” doesn’t feel non-pascal. I don’t get it.
> >
> > type
> >         TMyClass = class
> >                 private
> >                         list: TFPGList; auto;
> >                         otherList: TFPGList; auto;
> >         end;
> >
> > var
> >         c: TMyClass; auto;
> >
> > begin
> >         c := TMyClass.Create;
> >
>
> This looks ugly. It also introduces modifiers to variable
> declarations. Some features should not be part of the language, they
> should be built on top of it.
>

While I don't support the "auto" idea, you are also wrong in saying that it
"introduces" modifiers to variable declarations: there already are
modifiers like "cvar", "public" and "external".

Regards,
Sven

>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20180726/353e7766/attachment.html>


More information about the fpc-pascal mailing list