Although i wouldn't use go for "high level" development (that is, end-user apps or web services), it has really proved to be a great tool for middleware / technical layers.
Although i wouldn't use go for "high level" development (that is, end-user apps or web services), it has really proved to be a great tool for middleware / technical layers.
Not a fan of the built-in template syntax but there are luckily good (and faster) alternatives.
The reason go fits the "technical layer" best, is that technical layer deals with things closer to the machine, so the number of different types you need to manipulate is much lower, and is for the most part of the language (it doesn't go further than numbers and strings).
All of this is just my personal opinion of course.
EDIT: i know composition (which go provides) and subclassing provide the same possibilities in term of modeling, in theory. However in practice, not beeing able to say things like "An Electric Car, is a kind of Car, which is a kind of Vehicle" may make things cumbersome. So is not being able to simply create a function such as "sortByMileage" that applies to all kinds of Vehicle (and just that), but remain type safe.
To sum-up : relying on interfaces and composition only is IMHO not as powerful as having interface, composition, inheritance and generics (which most "enterprise" language have).
As for this kind of relationship, i'd say it's fairly widespread. One proof is that even relationnal DB such as postgresql added table inheritance.
Only if A: composition can't do the job somehow and B: you can't use perfectly normal factoring tools to do the work.
While I will tell you before anybody else complains that there is a non-zero percentage of the time that will happen, I will also tell you the average person who has never tried Go yet complains about its lack of generics anyhow will overestimate the amount of time that happens by a good order of magnitude or two.
It's the two most fundamental concept of any language : to be vs to have. Now it may or may not be just a philosophical difference and bring no practical consequences to a computer program, but at the minimum one can say it expresses two different concepts.
But it perfectly allows you to model complex real-life processes, and in a way much better than traditional class-based OOP approach.
"Composition over inheritance" is not a new trend, that was actually mentioned in first chapter of Gang of four's Design Patterns in 1995 [1]. In that regard, I feel like we mostly failed to ever use OOP properly (although, "fail" is probably too strong a word).
I'm actually annoyed that embedded types exist in go because it re-introduces the same problem (but I have an easy fix for that: I don't use them).
But really, what you're describing is a data structure problem. This can be solved without OOP, and structs are especially good at it.
[1] https://en.wikipedia.org/wiki/Design_Patterns#Introduction.2...
Sounds like a shortcoming of your tools. I spend a lot of time in Visual Studio working on native C++ and even there I can ctrl-click on something and jump to the declaration or definition. I bet there's something even better for Ruby.
When I write go code, I have a lot of static analysis tools, but I'm still glad it's easy for me to know what I can call without stopping for inspection.
And then you have a hybrid car with a drilling attachment.
I am not sure if it is a design school, but rather I think when you afford the ability to truly have mastery over your tool, then the humans using them can take them and create something you could have never envisioned yourself.
The popular approach seems to be these days to give them every single tool (and toolbelt), and they get lost in the chaos. (e.g "Is C++'s problem really that it needs more features?") I spent my first part of my career as a developer writing Java. I still don't feel like I know half of the language. Maybe this is because I have a feeble mind and can't grok these higher level concepts, or maybe it's because I didn't have time to learn 5 different programming paradigms under the same roof when I had work to do, I don't know the real answer. However, I have spent just under 2 writing full time Go and I feel like I have mastery over the entire language (I credit this to it's very digestible language specification).
It's the simplicity that makes it so beautiful and able to create the powerful tools. To draw a parallel in literature (a quip I read in a book recently), consider Shakespeare who wrote his masterpieces in blank verse. There were many other advanced forms of poetry, prose, and literary forms developed by then, but he chose this. Blank verse is not inherently complex, in fact it was used because of it's simplicity and ease of remembrance. Yet it was because of this simplicity and minimal structure that he was able to create some of the most beautiful artistic expressions of the english language.
Just like the most complex Web applications are written in JavaScript.
There is definitely truth to that. Go has taken over the Cloud, so there might even be parallel there as well.