From francois.green at gmail.com Sun Nov 11 21:09:06 2018 From: francois.green at gmail.com (Francois Green) Date: Sun, 11 Nov 2018 16:09:06 -0500 Subject: Lifting the restriction on the number of public classes per file Message-ID: In the face of the changes in code style that records will bring about, has there been renewed discussion about lifting the restriction? public interface Blue; public record IKB() implements Blue; public record Azure() implements Blue; public record Royal() implements Blue; Having to place each line in the code above in its own file seems harsh. From brian.goetz at oracle.com Mon Nov 12 16:33:22 2018 From: brian.goetz at oracle.com (Brian Goetz) Date: Mon, 12 Nov 2018 17:33:22 +0100 Subject: Lifting the restriction on the number of public classes per file In-Reply-To: References: Message-ID: <8543BF21-55F3-4764-9CB3-1240AFDD644B@oracle.com> Yes, this topic has come up, and we agree that (especially with sealed types) this can start to look a bit silly. We will take this discussion up again in the EG soon. > On Nov 11, 2018, at 10:09 PM, Francois Green wrote: > > In the face of the changes in code style that records will bring about, has > there been renewed discussion about lifting the restriction? > > public interface Blue; > public record IKB() implements Blue; > public record Azure() implements Blue; > public record Royal() implements Blue; > > Having to place each line in the code above in its own file seems harsh. From jeremy.a.barrow at gmail.com Sat Nov 24 19:13:20 2018 From: jeremy.a.barrow at gmail.com (Jeremy Barrow) Date: Sat, 24 Nov 2018 20:13:20 +0100 Subject: Annotation extension with CONDYN Message-ID: Hey everyone, As I was working on something relating to annotations, I realised we still use the typical pattern of using a class or some other constant to refer to specific functionality. With things like MethodHandles and a lot more recently CON DYN surely it's possible to embed a lot more into an annotation? Is there any specific technical restriction, because I would love being able to do something like: https://gist.github.com/Jezza/7d5bedaadbe3adcb65bb6e4981de9901 Right now we have to do something like: @Annotation("onBefore"), and then do the necessary things behind the scenes. This does raise questions such as being able to enforce signatures, etc, but I don't think that's a problem as it's no different to what it was before, and it's effectively the same as, say, accepting a MethodHandle as a parameter. Cheers, Jeremy.