> Am 24.03.2022 um 02:40 schrieb Hairy Pixels via fpc-devel
> :
>
>
>
>> On Mar 24, 2022, at 7:21 AM, Michael Van Canneyt via fpc-devel
>> wrote:
>>
>> I am all for merging the implementation of Ryan, but this is not my domain,
>> so one of the compiler people needs to look at it.
>>
>
>
> On Mar 24, 2022, at 7:21 AM, Michael Van Canneyt via fpc-devel
> wrote:
>
> I am all for merging the implementation of Ryan, but this is not my domain,
> so one of the compiler people needs to look at it.
>
FPC badly needs another reviewer or someone with authority otherwise. I’ve been
wa
> On Mar 24, 2022, at 8:14 AM, Hairy Pixels wrote:
>
> Search for "Case statement for class introspection” and you see can the
> little discussion we had about a potential speed up and why it wasn’t viable
> so for now it’s just using a if-else statement with A.ClassType = B.ClassType
> comp
> On Mar 23, 2022, at 10:09 PM, Stefan Glienke via fpc-devel
> wrote:
>
> JEP 420 is hardly a misnomer because it is so much more than just type
> checking in a switch statement - hence pattern matching.
> You can see in the various examples that you can combine all kinds of boolean
> expres
> On Mar 23, 2022, at 10:35 PM, Mattias Gaertner via fpc-devel
> wrote:
>
> Forget Java. The point is, that its "case" can be more than mere
> syntactic sugar. It could give a nice speed up and the compiler warns
> about unreachable statements.
Search for "Case statement for class introspect
On Wed, 23 Mar 2022, Mattias Gaertner via fpc-devel wrote:
On Wed, 23 Mar 2022 22:20:38 +0700
Hairy Pixels via fpc-devel wrote:
[...]
> Did you use multiple "is" or did you check for sorted and use one
> loop?
No it’s just like a the case of string syntax which checks for
equality with C
On Wed, 23 Mar 2022 22:20:38 +0700
Hairy Pixels via fpc-devel wrote:
>[...]
> > Did you use multiple "is" or did you check for sorted and use one
> > loop?
>
> No it’s just like a the case of string syntax which checks for
> equality with ClassType so the order does matter. Maybe it’s not
> exa
JEP 420 is hardly a misnomer because it is so much more than just type checking
in a switch statement - hence pattern matching.
You can see in the various examples that you can combine all kinds of boolean
expressions - C# has had this for quite a while and they are constantly
improving it.
That
> On Mar 23, 2022, at 10:13 PM, Mattias Gaertner via fpc-devel
> wrote:
>
>> Lol I just implemented this and made a merge request but I haven’t
>> heard back from anyone yet so it’s just sitting there….
>>
>> I basically just copied the structure used for “case of string” in
>> that it makes
On Wed, 23 Mar 2022 22:00:05 +0700
Hairy Pixels via fpc-devel wrote:
> Lol I just implemented this and made a merge request but I haven’t
> heard back from anyone yet so it’s just sitting there….
>
> I basically just copied the structure used for “case of string” in
> that it makes if a big if-e
I just remembered now I tried to follow the procedure to rebase the branch like
they wanted but I made a big mess of things (notice how it says 400+ changes).
I don’t know went wrong but you can see the changes I made in the commit
history but I’m not sure how to isolate them to make a diff. Dun
Lol I just implemented this and made a merge request but I haven’t heard back
from anyone yet so it’s just sitting there….
I basically just copied the structure used for “case of string” in that it
makes if a big if-else statement.
https://gitlab.com/freepascal.org/fpc/source/-/merge_requests/1
Hi,
I just stumbled over the new Java feature "Pattern Matching for switch".
https://openjdk.java.net/jeps/420
IMO it is a misnomer, but it has some interesting ideas.
Basically for Pascal it is a case block using the "is" operator.
Pseudo code:
procedure Fly(o: TObject);
begin
case o is
T
13 matches
Mail list logo