Hi Dominik,

Thanks for your message. I might write such a post, indeed, once things
stabilise. Right now, sealed types are used experimentally. Compilers (both
javac and ejc) don't seem to be fully ready yet. There are a few edge case
compiler bugs that are hard to isolate and report, which is why the
codebase hasn't been fully sealed yet.

Also, while the new QOM API surely should be sealed (look for "seal" in
https://github.com/jOOQ/jOOQ/issues/13640), I'm not sure yet if the DSL API
should be sealed as well. It would probably help prevent folks from
tampering with custom implementations of the DSL interfaces, which are
unlikely to work as expected without hacks. But it's hard to foresee if
sealing is really possible. One very limiting factor is the fact that the
permitted implementation (currently in org.jooq.impl, and package private)
must be visible to the sealed type (currently in org.jooq), so perhaps,
sealing the DSL isn't really possible without breaking compatibility.

Anyway, as I said, a blog post right now would be premature, before these
decisions stabilise. But then, it would certainly be interesting.

I hope this helps,
Lukas

On Tue, Feb 7, 2023 at 8:23 AM '[email protected]' via jOOQ User Group <
[email protected]> wrote:

> Hi Lukas,
> sometimes I take a look into the source code of JOOQ in order to
> understand this or that. I stumbled upon your usages of sealed classes and
> interfaces. It would be nice, if you can on a broader base e.g. on a blog
> post, explain your approach to use that language feature, your experience
> with it and pros and cons.
>
> Thanks in advance
> Dominik
>
> --
> You received this message because you are subscribed to the Google Groups
> "jOOQ User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jooq-user/7bc4d619-0cde-4866-8f75-26d7001eeab9n%40googlegroups.com
> <https://groups.google.com/d/msgid/jooq-user/7bc4d619-0cde-4866-8f75-26d7001eeab9n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jooq-user/CAB4ELO4mxHWkkDUeKWey_YD85yp7qD3hT2jQgukiRcRYkeOFPg%40mail.gmail.com.

Reply via email to