Re: [fpc-pascal] Generic type conflicts

2019-11-07 Thread Michael Van Canneyt
On Thu, 7 Nov 2019, Ben Grasset via fpc-pascal wrote: On Thu, Nov 7, 2019 at 10:23 AM Michael Van Canneyt wrote: If I understood Sven's example correct, then the compiler does exactly this already. It does in the sense of *code generation* for things that are specifically compiler intrin

[fpc-pascal] StringList micro optimization

2019-11-07 Thread AlexeyT via fpc-pascal
Procedure TStrings.SetDelimitedText(const AValue: string);  has about 16 calls to Length(AValue), so make a variable NLen to speed up it. -- Regards, Alexey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-b

Re: [fpc-pascal] Generic type conflicts

2019-11-07 Thread Ben Grasset via fpc-pascal
On Thu, Nov 7, 2019 at 10:23 AM Michael Van Canneyt wrote: > If I understood Sven's example correct, then the compiler does exactly this > already. > It does in the sense of *code generation* for things that are specifically compiler intrinsics (which I was aware of), but not in a sense that mak

Re: [fpc-pascal] Generic type conflicts

2019-11-07 Thread Sven Barth via fpc-pascal
Michael Van Canneyt schrieb am Do., 7. Nov. 2019, 16:23: > > > On Thu, 7 Nov 2019, Ben Grasset via fpc-pascal wrote: > > > On Thu, Nov 7, 2019 at 3:03 AM Sven Barth via fpc-pascal < > > fpc-pascal@lists.freepascal.org> wrote: > > > >> If there is no type checking, then it is *not* verified by the

Re: [fpc-pascal] Generic type conflicts

2019-11-07 Thread Michael Van Canneyt
On Thu, 7 Nov 2019, Ben Grasset via fpc-pascal wrote: On Thu, Nov 7, 2019 at 3:03 AM Sven Barth via fpc-pascal < fpc-pascal@lists.freepascal.org> wrote: If there is no type checking, then it is *not* verified by the compiler. Perhaps "no type checking" was not the write way to put it. A b

Re: [fpc-pascal] Generic type conflicts

2019-11-07 Thread Ben Grasset via fpc-pascal
On Thu, Nov 7, 2019 at 3:03 AM Sven Barth via fpc-pascal < fpc-pascal@lists.freepascal.org> wrote: > If there is no type checking, then it is *not* verified by the compiler. > Perhaps "no type checking" was not the write way to put it. A better way to describe it might be: Since the compiler *al

Re: [fpc-pascal] Generic type conflicts

2019-11-07 Thread Sven Barth via fpc-pascal
Am 07.11.2019 um 01:33 schrieb Ben Grasset via fpc-pascal: On Wed, Nov 6, 2019 at 12:44 PM Sven Barth via fpc-pascal > wrote: Pascal has a strong type safety, thus something like the if-expression won't be used/allowed to weaken that. If that