7 ms·
If I were to build a list of the reasons I use go, it wouldn't be terribly different than this one. But interestingly, while I program go every day, I sort of h
by kasey_junk 9y ago
If I were to build a list of the reasons I use go, it wouldn't be terribly different than this one. But interestingly, while I program go every day, I sort of hate it as a language.
You'll note this list doesn't actually have much to do with the language per se, the only point directly related to that is that go has a short list of reserved words (which is true of most languages).
So for future language designers (or existing language designers that want to increase the popularity of their language) it seems like things like language ergonomics, power, etc are less important than having a standard batteries included development stack coupled with out of the box "good enough" performance.
- secure 9y agoI noticed as well that I didn’t mention a single language feature, even though I do actually like many :). I agree with the sentiment you expressed: the overall experience when using a language matters to me much more than individual language pros or cons.
- cyphar 9y ago> But interestingly, while I program go every day, I sort of hate it as a language. I have the exact same feeling. There's a lot wrong with Go, but it makes up for its problems by having very nice tooling (though of course there's problems with that too).
- fetchfetch 9y agoAfter having coded tens of thousands of lines in Golang for 4 years, there are a list of probably hundreds of grievances I have about the language itself. The problem is that they're generally outweighed by the simplicity, consistency, and clarity of the language. Is the error system terrible? Obviously. Lack of abstract data types? Awful. Is Rust one thousand fold safer and more syntactically powerful by comparison? Sure. But the fact is, in a world where we as developers often are learning and working in a new language every year or two, time-to-productivity and proficiency in a given language is one of the most important, if not the most important, metrics for a language. And Golang knocks this out of the park with its obvious syntax and great tooling. You can bring in a new junior programmer onto your Golang stack and have then turning out useful pull requests in a week or two, which I can't say for languages like Rust. I _hate_ much of Golang's engineering, but for collaborative programming I think anyone would agree that it's a highly productive language.
- virmundi 9y agoWhy learn a new language just to learn a new language for production stuff? I looked at at switching to Go from Java for my flagship product. I couldn't find enough compelling reasons to switch. It didn't offer enough benefits to outweigh the benefits of Java + Spring Boot. As a result, Java it is. Now for a new product that I might sell as traditional installed software, Go makes some sense here since it simplifies install. My clients wouldn't need to install and maintain the VM. In the end I wonder why switch to a new stack just because? I understand learning the languages to see if they are better tools. I understand learning for the sake of learning. But why bet a business on a new language just because it's cool?
- djeikyb 9y agoMy team just chose golang instead of java or dotnet core for a new crud app. I'm not especially fond of go, but mean length of feedback loops are worth it (so far). We have a bunch of tests, and they all run in a few hundredths of a second. Same coverage in java is usually several seconds at least. Often up to 30s if running tests with maven. Standing up the app is also instantaneous. Spring boot apps with hibernate often take at least ten seconds. In prod this doesn't matter. But a cheap app start means integration tests are cheap. An fs hook runs both unit and integration tests every time the code changes. ps. all the things people hate about go are true
- riku_iki 9y agoThere are lighter options in java world, my dropwizard server with JDBI starts in 1.2sec.
- parenthephobia 9y agoI'm genuinely unsure if this is a joke. If you're running that on a modern computer, your server is spending billions of clock cycles starting up. What on Earth is it doing? :) If I write a Go server, I'm unhappy if it takes more than 0.2 seconds to start.
- jwilliams 9y ago> go has a short list of reserved words I use go a lot now. However, I must admit I find the use of interface{} "aka empty interface, aka void*" a weird one. It's technically correct, but it's an odd semantic.
- Merovius 9y agoI know this is repeated often, but only because it apparently still has to: interface{} is very different from void*. It carries type-information with it. That makes it safe.
- hota_mazi 9y agoNo, it's not safe. It's basically a way to disable compiler checks, so it is by definition, not safe.
- majewsky 9y agoIt is way safer than void * : A void * can be cast to (and then used as) any arbitrary type, leading to all sorts of undefined behavior. On the other hand, the following code will just panic() (i.e. exit cleanly without corrupting memory). var x int = 5 var i interface{} = &x *(i.(*string)) = "boom"
- hota_mazi 9y ago> the only point directly related to that is that go has a short list of reserved words (which is true of most languages). The number of keywords of a language is completely unrelated to its complexity (see Brainfuck or Lisp).
- majewsky 9y agoOn the other hand, see ABAP. https://www.slideshare.net/PrakashThirumoorthy/complete-list-of-all-sap-abap-keywords https://www.slideshare.net/PrakashThirumoorthy/complete-list...
- jasode 9y agoSAP ABAP syntax includes: + database retrieval and manipulation as a 1st class concept. ABAP doesn't require a 3rd-party ORM and therefore, SQL statements are 1st class syntax. + GUI capabilities as 1st class syntax (user interface elements for forms, lists, grids, visual reports, etc) Golang core doesn't have those, so it understandably doesn't need extra official keywords to address that functionality. SAP ABAP has more keywords that's typical for a 4GL type of language. Like other business-domain 4GLs, the complexity isn't the language syntax -- it's navigating the gigantic data model to find where important information lives. (e.g. Out of 10,000 tables, where does the sales invoice live? If an invoice is paid, where is that status field? And to make it harder, many of the database column names are German instead of English ... like AUGRU[1] for "auftrag grund" instead of English "OREASON" for "order reason".) If Golang language spec was revised to include a 1st-class ORM and GUI & report builder into its core syntax, it would be a more apples-to-apples comparison. Golang can have less keywords, because it has less features. [1] http://www.se80.co.uk/saptables/v/vbak/vbak.htm http://www.se80.co.uk/saptables/v/vbak/vbak.htm
- Merovius 9y ago> Golang can have less keywords, because it has less features. So, you are saying… because it's less complex?
- 9y ago
- kazinator 9y ago> language ergonomics, power, etc are less important than having a standard batteries included development stack To programmers under twenty five. And that explains not only Go, but volumes of computing history.
- deleted 9y ago[deleted]
- stewbrew 9y agoThere could be a valley around 30 where you prefer purity. It's possible though that you soon get tired of language wars and prefer something that makes it easy for you to get things done, i.e. a complete standard library and a good package manager. (And no, I personally don't use / particularly like go but I think your statement is wrong.)
- Chris_Newton 9y agoThat seems a little unfair. I have better things to do with my programming time than reinvent the wheel every time I need to manipulate common data structures, or make an HTTP request, or query a database, or parse a CSV file, or do some mathematics efficiently, or draw a picture showing the results of that mathematics. I’m some way past 25 these days, but if there is one lesson I’ve learned about programming languages over the years, it is that a good supporting ecosystem usually is worth more than even quite substantial improvements in the language itself. It’s not that language improvements aren’t welcome — I think some programming languages are much better than others. However, you’re always going to be limited in how productive you can be with a language that lacks comprehensive libraries or good tools or enough people using it to discuss interesting issues or hire a full team of staff, no matter how brilliant the design of the language itself might be. I don’t know what the worst mainstream programming languages are today, but in purely technical terms surely C, Java and JavaScript all make the shortlist. Compared to many other contemporary languages, these three all lack features, often take a lot of code to get quite simple things done, and are full of easy ways to make mistakes. And yet, in terms of how much useful software has been written in them, they are among the most successful languages we’ve ever had. Why? At least in part, I think it’s because they have three of the most well-developed ecosystems around them.
- logicallee 9y ago>But interestingly, while I program go every day, I sort of hate it as a language. I would be interested in asking you to put some of these thoughts down. This can be contentious as it's matters of taste (i.e. I don't want others to reply to you defending it), so if you wanted you could email me - my contact is in my profile. Just a few thoughts -- i.e. what you had in mind when you wrote that -- would be really helpful for me. What makes you hate the language? Thanks so much for any thoughts.