--
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...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
As far i can get to understand the english language (i'm not a native speaker), the "er" seems to denotes or describe things in a more "active way" (the thing that they actually do by itself), and the "able" describes things in a more "passive way" (the thing that you can "ask it/his/her" to do). Do you find this appreciation correct?
As far i can get to understand the english language (i'm not a native speaker), the "er" seems to denotes or describe things in a more "active way" (the thing that they actually do by itself), and the "able" describes things in a more "passive way" (the thing that you can "ask it/his/her" to do). Do you find this appreciation correct?
--
Hello all!I don't know very well what is the topic about using "er" or "able" or any other suffix for the single method interfaces (a.k.a. "funcitonal interfaces"), but i would like to address some thoughts, hope you can bear with me, here we go:If a take a look to the Readable interface in Java and the io.Reader interface in Golang, i would say the these "two" persons (assuming that they actually were different persons) were thinking in the same thing (i mean, an object to which you can send it a message [or invoke method] to read bytes or chars, let's bear with me here and let's aggree that both interfaces as abstractions has the same intend) but use different naming, right
On Jan 18, 2019, at 10:43 AM, Robert Johnstone <r.w.jo...@gmail.com> wrote:
Hello,Just to paint the bikeshed...The -er suffix makes sense for methods that follow the convention of naming methods after verbs. Forget io.Reader for a moment, and think of os.File. When you call the method Read, you are asking the instance to read from the file on disk. myvar.Read can be understood as subject/verb. In this case, myvar is the reader, but it is passing the data back to you.Robert
On Thursday, 17 January 2019 14:48:30 UTC-5, Jakob Borg wrote:On 16 Jan 2019, at 15:42, Victor Giordano <vituc...@gmail.com> wrote:
As far i can get to understand the english language (i'm not a native speaker), the "er" seems to denotes or describe things in a more "active way" (the thing that they actually do by itself), and the "able" describes things in a more "passive way" (the thing that you can "ask it/his/her" to do). Do you find this appreciation correct?
This was a mental stumbling block for me for a long time when I started out with Go. For me, the "Reader" is the one who calls Read(), so an io.Reader seemed like the opposite of what I wanted. I would have better understood it as io.Readee. It works out better if I see the Reader as some sort of intermediate entity that affects reads on whatever the underlying thing is you want to read from… Or if I see it as just an interface-indicating nonsense suffix, like a capital-I prefix…
//jb
--
You received this message because you are subscribed to a topic in the Google Groups "golang-nuts" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/golang-nuts/nzYmUimJUhE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to golang-nuts...@googlegroups.com.