Of course. And in Go you would write code in a way that would avoid the need for such constructs in the first place.
Aside: is there a way to get El Capitan Mail.app to play nice with Google Groups? > On Oct 8, 2016, at 12:04 PM, Henrik Johansson <[email protected]> wrote: > > But that is just syntactic sugar around the fact that Java does not have > first class functions. At least not in the sense Go does. > > > On Sat, Oct 8, 2016, 17:31 Pietro Gagliardi <[email protected] > <mailto:[email protected]>> wrote: > In Java, if an interface contains exactly one method, and that method is not > already part of java.lang.Object, the syntax > > Interface i = (arguments) -> { > code > }; > > will make an object i of that interface type with the given closure as the > method body. This interface is called a functional interface. > > Pre-Java 8, the same thing could be done with > > Interface i = new Interface() { > public void method() { > code > } > }; > > These interface literals are different from Go's interface literals. > >> On Oct 8, 2016, at 11:24 AM, Jan Mercl <[email protected] >> <mailto:[email protected]>> wrote: >> >> >> >> On Sat, Oct 8, 2016, 16:39 Pietro Gagliardi <[email protected] >> <mailto:[email protected]>> wrote: >> >> >> Go does not have functional interfaces or interface literals. >> >> I don't know what is meant by 'functional interfaces' but Go definitely >> supports interface literals. >> >> -- >> -j >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "golang-nuts" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] >> <mailto:[email protected]>. >> For more options, visit https://groups.google.com/d/optout >> <https://groups.google.com/d/optout>. > > > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <mailto:[email protected]>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. > > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <mailto:[email protected]>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
