Re: [EXT] Re: ClassFile API

2024-01-30 Thread Remi Forax
- Original Message - > From: "Jochen Theodorou" > To: "dev" > Sent: Sunday, January 28, 2024 10:38:24 PM > Subject: Re: [EXT] Re: ClassFile API > On 28.01.24 15:05, Remi Forax wrote: > [...] >> Hello, >> before i answer to your question

Re: [EXT] Re: ClassFile API

2024-01-28 Thread Jochen Theodorou
On 28.01.24 15:05, Remi Forax wrote: [...] Hello, before i answer to your questions, my remark about sealed types is that the API of the classfile library is based on sealed types and pattern matching. A sealed type is not extensible meaning that if you target a specific version of the classfil

Re: [EXT] Re: ClassFile API

2024-01-28 Thread Remi Forax
- Original Message - > From: "Jochen Theodorou" > To: "dev" > Sent: Sunday, January 28, 2024 1:19:24 PM > Subject: Re: [EXT] Re: ClassFile API > On 27.01.24 18:58, Remi Forax wrote: > [...] >> The classfile API uses sealed types, once those w

Re: [EXT] Re: ClassFile API

2024-01-28 Thread Jochen Theodorou
On 27.01.24 18:58, Remi Forax wrote: [...] The classfile API uses sealed types, once those will be updated either the groovy compiler will need to be updated or a default of a switch will be called. See how the overview of the API uses "default" everywhere. https://cr.openjdk.org/~asotona/JD

Re: [EXT] Re: ClassFile API

2024-01-27 Thread Remi Forax
- Original Message - > From: "Jochen Theodorou" > To: "dev" > Sent: Saturday, January 27, 2024 12:35:40 PM > Subject: Re: [EXT] Re: ClassFile API > On 23.01.24 19:33, Milles, Eric (TR Technology) via dev wrote: >> An API like this works fine f

Re: [EXT] Re: ClassFile API

2024-01-27 Thread Jochen Theodorou
On 23.01.24 19:33, Milles, Eric (TR Technology) via dev wrote: An API like this works fine for straightline code. But if you need to add instructions conditionally, repeat blocks for additional instances, or other complex scenarios; builders can quickly break down. I would wait to see how th

RE: [EXT] Re: ClassFile API

2024-01-23 Thread Milles, Eric (TR Technology) via dev
hen Theodorou Sent: Tuesday, January 23, 2024 11:28 AM To: dev@groovy.apache.org Subject: [EXT] Re: ClassFile API External Email: Use caution with links and attachments. On 22.01.24 01:23, Daniel Sun wrote: > Hi Jochen, > > Groovy relies on ASM lib directly, so it would save lots o

Re: ClassFile API

2024-01-23 Thread Jochen Theodorou
On 22.01.24 01:23, Daniel Sun wrote: Hi Jochen, Groovy relies on ASM lib directly, so it would save lots of work if we could have an abstract layer whose API aligns with ASM lib, just change ASM package name(org.objectweb.asm) with Groovy package name, e.g. org.apache.groovy.classfile.

Re: ClassFile API

2024-01-21 Thread Daniel Sun
Hi Jochen, Groovy relies on ASM lib directly, so it would save lots of work if we could have an abstract layer whose API aligns with ASM lib, just change ASM package name(org.objectweb.asm) with Groovy package name, e.g. org.apache.groovy.classfile. Cheers, Daniel Sun On 2024/01/21 13:05

Re: ClassFile API

2024-01-21 Thread Jochen Theodorou
On 20.01.24 17:47, Daniel Sun wrote: Hi Jochen, Both ASM lib and Class-File API are good, I would like to have an abstract layer for them. The API for the abstract layer could be align with ASM lib as Groovy relies on ASM lib heavily. If Groovy finds Class-File API is avaible, use

Re: ClassFile API

2024-01-20 Thread Daniel Sun
Hi Jochen, Both ASM lib and Class-File API are good, I would like to have an abstract layer for them. The API for the abstract layer could be align with ASM lib as Groovy relies on ASM lib heavily. If Groovy finds Class-File API is avaible, use Class-File API as the implementation fo