Re: [go-nuts] clarifying Go FAQ: Is Go an object-oriented language?

2022-11-24 Thread Sven Anderson
Ayan George schrieb am Di. 22. Nov. 2022 um 16:03: > > The Go FAQ begins the answer to the question, "Is Go an object-oriented > language," with, "yes and no." > […] > But I feel like programmers bringing their ideas from other less > ambiguously object oriented languages like Java and C++

Re: [go-nuts] clarifying Go FAQ: Is Go an object-oriented language?

2022-11-24 Thread robert engels
OO as a fad? This is Thanksgiving not April Fool’s Day. > On Nov 24, 2022, at 3:25 PM, TheDiveO wrote: > > Reading the "yes and no" part as a newcomer to Go actually made me snigger > and I though that this kind of answer shows a thorough and differentiated > thinking not shy of dealing with

Re: [go-nuts] clarifying Go FAQ: Is Go an object-oriented language?

2022-11-23 Thread robert engels
Your reading comprehension skills need some work. The point of “labels matter” was answering Rob Pike’s “why does it matter” question. I used extremely different objects - yet both modes of transportation - intentionally to highlight the need for common definitions in order to communicate.

Re: [go-nuts] clarifying Go FAQ: Is Go an object-oriented language?

2022-11-23 Thread Holloway Kean Ho
> I think the amount of hair-splitting over what is an object oriented language is reason to say it *isn't* an Object Oriented language at all. Given the FAQ header's "Is Go an object-oriented language? emphasizing that "object-oriented" is in lowercase, not the titlecase "Object-Oriented" that

Re: [go-nuts] clarifying Go FAQ: Is Go an object-oriented language?

2022-11-23 Thread robert engels
I am not sure what you are trying to say here. > On Nov 23, 2022, at 8:36 PM, Holloway Kean Ho > wrote: > > Your examples have something to do with the developer's psychological problem > for failing to distingush between objects; not OO, OOP, or any programming > languages. Neither Java or

Re: [go-nuts] clarifying Go FAQ: Is Go an object-oriented language?

2022-11-23 Thread Holloway Kean Ho
> If the answer to that question is "yes and no," it'd be less ambiguous to simply say, "no." And that would be a definitive way of indicating that it woul be inappropriate to apply many patterns from object oriented languages to Go -- and to encourage people to accept Go for what it is. Go

Re: [go-nuts] clarifying Go FAQ: Is Go an object-oriented language?

2022-11-23 Thread robert engels
Human beings survive by classifications and compartmentalizing. Applying a label associates it with certain traits. If someone said “I have a car for sale”, and you showed up and it had no wheels but a hull and a sail - you might be a bit upset. Whether Go is a car or a boat is up to the

Re: [go-nuts] clarifying Go FAQ: Is Go an object-oriented language?

2022-11-23 Thread Kamil Ziemian
I think in the 1990s it was a debate if Lisp with Common List Object System (CLOS) is OOP language. The answer they arrive was something like that. "No, if your definition of OOP is based on C++. But, why your definition of OOP should be based on C++?" I think the same fits Go. Go is in many

Re: [go-nuts] clarifying Go FAQ: Is Go an object-oriented language?

2022-11-22 Thread Ian Lance Taylor
On Tue, Nov 22, 2022 at 11:31 AM Ayan George wrote: > > For me this is as much if not more of a communications issue than a technical > one. It seems like the definition of what an OO language is broad enough > that we could go on forever about if Go is one. > > The language developers can

Re: [go-nuts] clarifying Go FAQ: Is Go an object-oriented language?

2022-11-22 Thread 'Dan Kortschak' via golang-nuts
On Tue, 2022-11-22 at 10:16 -0800, Ian Lance Taylor wrote: > On Tue, Nov 22, 2022 at 10:11 AM Robert Engels > wrote: > > > > I do not know why the mailing list is set up as the sender is the > > user. Is should always have the sender be the list email and the > > name be the user, or the sender

Re: [go-nuts] clarifying Go FAQ: Is Go an object-oriented language?

2022-11-22 Thread Ayan George
Great points. For me this is as much if not more of a communications issue than a technical one. It seems like the definition of what an OO language is broad enough that we could go on forever about if Go is one. The language developers can also choose to declare what it is meant to be

Re: [go-nuts] clarifying Go FAQ: Is Go an object-oriented language?

2022-11-22 Thread Ian Lance Taylor
On Tue, Nov 22, 2022 at 10:11 AM Robert Engels wrote: > > I do not know why the mailing list is set up as the sender is the user. Is > should always have the sender be the list email and the name be the user, or > the sender details included elsewhere. I don’t have this problem in any other >

Re: [go-nuts] clarifying Go FAQ: Is Go an object-oriented language?

2022-11-22 Thread 'Thomas Bushnell BSG' via golang-nuts
Late binding means you don't need to know the types of your parameters *at all* when you write a method call. If the language supported late binding, then you would be able to define all your variables as Object and *everything would continue to work*. In Go you could define everything as

Re: [go-nuts] clarifying Go FAQ: Is Go an object-oriented language?

2022-11-22 Thread 'Thomas Bushnell BSG' via golang-nuts
Both Java and Go require that a method be instantiated in the declared interface of the type at compile time. This is contrary to the point of late binding. In the case of Go, this cannot be detected, because everything is built together. But with Java, you cannot call a method on an object

Re: [go-nuts] clarifying Go FAQ: Is Go an object-oriented language?

2022-11-22 Thread Matt KØDVB
I didn't say Java didn't have late binding, but that it didn't have late binding of every possible type (the "all things" in Kay's quote). On Tue, Nov 22, 2022 at 10:25 AM Robert Engels wrote: > Why do you say that Java does not have late binding. It 100% does. In fact > the JVM supports

Re: [go-nuts] clarifying Go FAQ: Is Go an object-oriented language?

2022-11-22 Thread Robert Engels
The wiki page on late binding discusses the Java facilities in depth. It also misses things like runtime proxy interfaces. > On Nov 22, 2022, at 10:25 AM, Robert Engels wrote: > >  > Why do you say that Java does not have late binding. It 100% does. In fact > the JVM supports dynamic

Re: [go-nuts] clarifying Go FAQ: Is Go an object-oriented language?

2022-11-22 Thread Robert Engels
Why do you say that Java does not have late binding. It 100% does. In fact the JVM supports dynamic dispatch to make this as efficient as possible. Then the JIT optimizes it even more based on runtime behavior. > On Nov 22, 2022, at 10:18 AM, Matt KØDVB wrote: > >  > But see

Fwd: Re: [go-nuts] clarifying Go FAQ: Is Go an object-oriented language?

2022-11-22 Thread Jan Mercl
): You can create an email for participating on this ML for free in minutes. There are bazilions of such services available all over the Internet. -j -- Forwarded message - From: Date: Tue, Nov 22, 2022 at 4:56 PM Subject: Re: Re: [go-nuts] clarifying Go FAQ: Is Go an object-oriented

Re: [go-nuts] clarifying Go FAQ: Is Go an object-oriented language?

2022-11-22 Thread Matt KØDVB
But see https://en.wikipedia.org/wiki/Self_(programming_language) Self was considered an OO language back when I was a grad student and is still listed that way today, even though it has neither classes nor inheritance. Anyway, my point would be that the term OO originates with Alan Kay and the

Re: [go-nuts] clarifying Go FAQ: Is Go an object-oriented language?

2022-11-22 Thread 'Thomas Bushnell BSG' via golang-nuts
Asking "the definition of object oriented programming" seems a bad idea to me. Alan Kay invented the term, and he was pretty clear that C++ was not anything like what he had in mind, and yet, a lot of people think C++ is an object oriented language. I don't, as it happens. Inheritance used to be

Re: [go-nuts] clarifying Go FAQ: Is Go an object-oriented language?

2022-11-22 Thread Robert Engels
The wiki OO page lists classes as a requirement - but not necessarily inheritance. Class variables require classes. Also, your link does not work. > On Nov 22, 2022, at 9:56 AM, Jan Mercl <0xj...@gmail.com> wrote: > > On Tue, Nov 22, 2022 at 4:43 PM Robert Engels wrote: > >> Go is not

Re: [go-nuts] clarifying Go FAQ: Is Go an object-oriented language?

2022-11-22 Thread Jan Mercl
On Tue, Nov 22, 2022 at 4:43 PM Robert Engels wrote: > Go is not listed as an OO language on Wikipedia. Check https://en.wikipedia.org/wiki/Go_(programming_language): "ParadigmMulti-paradigm: concurrent imperative, object-oriented[1][2]" > Personally I think it is OO-like. OO typically has

Re: [go-nuts] clarifying Go FAQ: Is Go an object-oriented language?

2022-11-22 Thread Robert Engels
Also, there is an interesting point about OO languages made by Rob Pike (on the wiki page) that would also imply that Go is not OO by design. > On Nov 22, 2022, at 9:43 AM, Robert Engels wrote: > >  > Go is not listed as an OO language on Wikipedia. > > Personally I think it is OO-like. OO

Re: [go-nuts] clarifying Go FAQ: Is Go an object-oriented language?

2022-11-22 Thread Robert Engels
Go is not listed as an OO language on Wikipedia. Personally I think it is OO-like. OO typically has inheritance. There are also no “class variables” - only package level - which makes some encapsulation patterns harder (every class has to become a package). > On Nov 22, 2022, at 9:06 AM,

Re: [go-nuts] clarifying Go FAQ: Is Go an object-oriented language?

2022-11-22 Thread Matt KØDVB
The correct answer is actually “yes” because neither classes nor inheritance are necessary or sufficient for “object-oriented” programming. https://www.youtube.com/watch?v=jexEpE7Yv2A Sent from my iPad > On Nov 22, 2022, at 9:02 AM, Ayan George wrote: > >  > > The Go FAQ begins the answer

[go-nuts] clarifying Go FAQ: Is Go an object-oriented language?

2022-11-22 Thread Ayan George
The Go FAQ begins the answer to the question, "Is Go an object-oriented language," with, "yes and no." https://go.dev/doc/faq#Is_Go_an_object-oriented_language The section goes on to say that Go has methods but there is no type hierarchy. I guess those are the yes and no. But I feel like