Sorry for the delayed reply, I sent that and went on a LONG staycation
where I (near literally) unplugged from anything remotely related to work.
To answer Konrad's question first: I don't have any particular module in
mind, just a question that popped in my head. Don't take my verbosity for
passion, though. I just wanted to provide more context/a start to the
conversation, rather than a "y u no lombok".

I am a fan of lombok, but for some projects it just doesn't make sense, and
Sling may just be one - per Konrad's point that it doesn't have a lot of
"data" carrier classes with getters/setters.

I totally agree with records (I even mentioned it in footnote [6] in the
first email). I am extremely eager to use newer Java features (switch
expressions, records, text blocks, pattern matching... , to name a few),
but am unfortunately constrained by the realities of how the corporate
world works.

Thanks for your inputs!

-Paul


On Mon, Jan 3, 2022 at 5:24 AM Stefan Seifert
<[email protected]> wrote:

> i would also favor to *not* add Lombok to any sling modules.
>
> stefan
>
> >-----Original Message-----
> >From: Paul Bjorkstrand <[email protected]>
> >Sent: Thursday, December 23, 2021 10:47 PM
> >To: [email protected]
> >Subject: Introducing Lombok to Sling?
> >
> >I am not a huge fan of boilerplate code, and getters/setters are my
> biggest
> >pet peeve. I searched the dev archives and found nothing that referenced
> >Lombok. Is there a reason it has not yet been introduced that I am not
> >aware of? If not, what is everyone's opinion around using Lombok within
> >Sling? I looked at the license, and it seems to be near-identical to HPND
> >[1] and HPND is one of ASF's Category A licenses [2]. It uses/includes ASM
> >[3] which uses a 3-clause BSD license [4], also one of the Category A
> >licenses.
> >
> >While I wouldn't recommend allowing _everything_ from Lombok to be used, I
> >think it would be fair to allow the use of a subset of the features. I
> >would recommend the following approach:
> >
> >These stabe features of Lombok [5] can be used without restriction:
> >- @Getter/@Setter
> >- @ToString
> >- @EqualsAndHashCode
> >- @NoArgsConstructor/@RequiredArgsConstructor/@AllArgsConstructor
> >- @Data/@Value (at least until we can use records [6], introduced in JDK
> >14, finalized in JDK 16)
> >- @Builder
> >- @Slf4j
> >
> >All other stable features would be evaluated on a per-use basis. All
> >experimental features would not be allowed to be used.
> >
> >These seem, to me, to be reasonable guidelines, and align with the usages
> I
> >have seen in other places (including my own projects).
> >
> >[1]: https://opensource.org/licenses/HPND
> >[2]: https://www.apache.org/legal/resolved.html#category-a
> >[3]: https://asm.ow2.io/index.html
> >[4]: https://opensource.org/licenses/BSD-3-Clause
> >[5]: https://projectlombok.org/features/all
> >[6]: https://docs.oracle.com/en/java/javase/14/language/records.html
> >
> >
> >-Paul
>

Reply via email to