3 ms·
The amazing speed of the compiler means the development cycle is a fast as a scripting language even though full optimizations are always switched on. This is
by stcredzero 15y ago
The amazing speed of the compiler means the development cycle is a fast as a scripting language even though full optimizations are always switched on.
This is a common misconception of those who work mainly in compiled languages. In some dynamic languages, you don't just have the same edit-test-debug cycle. Advanced users of dynamic languages can conduct mini edit-test-debug within all the parts of the larger scale edit-test-debug cycle.
Go is not object-oriented. This, in my opinion, is a massive plus for the language....In the real world, things are fuzzy and they spread across multiple conceptual boxes all at once. Is it a circle or an ellipse? Is she an employee or a homeworker? Classifying things into strict type hierarchies, although seductive, is never going to work.
Here, the author is simply wrong. This is another common misconception about OO. You don't need strict type hierarchies. You don't even need classes at all for OO.
EDIT: Other than that, an overall good review.
- luriel 15y ago> Here, the author is simply wrong. This is another common misconception about OO. You don't need strict type hierarchies. You don't even need classes at all for OO. There are almost an infinite number of definitions of OO, I suspect the author was referring to the generally accepted and most widespread ones, which include classes and inheritance as some of their most fundamental characteristics. Or as Paul Graham put it ( http://harmful.cat-v.org/software/OO_programming/ http://harmful.cat-v.org/software/OO_programming/ ): "The phrase "object-oriented" means a lot of things. Half are obvious, and the other half are mistakes." Go implements (and improves on) the obvious ones (which by the way mostly have been around for longer than the term OO itself), while avoiding the rest.
- stcredzero 15y agoThere are almost an infinite number of definitions of OO, I suspect the author was referring to the generally accepted and most widespread ones, which include classes and inheritance as some of their most fundamental characteristics. Yes, but everyone I know who does real work with Objects knows that the textbook definitions aren't what people do with real systems. That makes it sound like the author only knows the textbook definitions.
- stock_toaster 15y ago> Yes, but everyone I know who does real work with Objects knows that the > textbook definitions aren't what people do with real systems. That > makes it sound like the author only knows the textbook definitions. Phrases like 'who does real work' and 'people do with real systems' makes it sound a bit like a 'no-true-scotsman'. I imagine that was not your intent. Anyway, I think the point is that the common perception of object systems are likely those commonly used in Java, C++, and C#. I say 'likely' simply because I am guessing that those are the more popular by volume of code written. Go has a different approach than those.
- stcredzero 15y ago...real systems' makes it sound a bit like a 'no-true-scotsman' Isn't there a meta-fallacy here? Sometimes there are things that experienced people don't say, but some, like inexperienced undergraduates, do. Anyway, I think the point is that the common perception of object systems are likely those commonly used in Java, C++, and C#. I say 'likely' simply because I am guessing that those are the more popular by volume of code written. Go has a different approach than those. There may be some selection bias here. "Everyone I know who does real work with Objects" is by happenstance mostly working in Smalltalk. The pragmatic approach most people take there involves quite a bit of duck typing. (And lots of grousing about how those interfaces aren't documented.) There's also a lot of bad legacy code that needs a refactoring cluestick there too, tbh.
- iand 15y agoThanks for the comments. I take your point about OO, but I was aiming at producing a broad overview of Go which necessarily means simplifying in some parts. To 90% of developers today brought up on strongly typed languages such as Java and C#, OO means single inheritance type hierarchies.
- stcredzero 15y agoYes, but people are actually targeting single-inheritance as the predominant means of polymorphism? What happened to interfaces? (Plus things like Strategies.) To me your "simplification" is a bit of a straw man.
- kibwen 15y agoI agree with your decision to not label Go as object-oriented; to too many people that term is simply synonymous with inheritance. But rejection of the term itself doesn't mean we should automatically reject the often-related concepts of encapsulation and polymorphism, both of which we can have without inheritance. Specifically, you say this: I can hear the die-hards screaming already about encapsulation, inheritance and polymorphism. It turns out that these things are not as important as we once thought. And then you proceed to give examples that only attempt to refute the usefulness of type hierarchies, without addressing encapsulation and polymorphism. I'd be curious to know what facilities, if any, Go provides for these concepts.
- iand 15y agoGo doesn't support polymorphic methods but supports polymorphic types through interfaces. Encapsulation is through the private/public naming convention I refer to in the blog post.
- stcredzero 15y agoI can hear the die-hards screaming already about encapsulation, inheritance and polymorphism. Any die-hards screaming about all 3 of those should be viewed with a bit of skepticism. When I talked about this a lot, folks were "meh" about inheritance, especially class-based inheritance. The only thing I see as being worthy of die-hard adherence is polymorphism. Encapsulation is there to help enable polymorphism. I'll note that the degree of encapsulation varies amongst systems that call themselves OO.
- reycharles 15y agoI recently read this[1] article. It explains what OOP really is pretty well I think. The article agrees with you about inheritance. [1]: http://www.cs.utexas.edu/~wcook/papers/OOPvsADT/CookOOPvsADT90.pdf http://www.cs.utexas.edu/~wcook/papers/OOPvsADT/CookOOPvsADT...