Hi Goperhs! How you doing? Hope just fine!

I'm wondering why the language allow me to write something like this:

type IncFunc func(a int) int

type Incrementor interface {
IncFunc *// <-- THIS is allowed*
IncQuantity() int
}

(RTR example here <https://go.dev/play/p/a72VoAhPo4h>)

I don't get how I can make leverage of that.. or if has any sense at all 
🥴😵‍💫
As I recall an interface is a set of methods, and a method do have a 
name... the thing here is that the name if the name of the type not the 
function's name. 

Thanks in advance.
Víctor.



-- 
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 golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/233f8e98-1c59-442b-b2d1-282a2e1f231en%40googlegroups.com.

Reply via email to