And yet we keep writing Go.
By comparison, I'm a bit put off by the Rust community's evangelism, but that might just be my personal experiences with Rust community members.
And yet we keep writing Go.
By comparison, I'm a bit put off by the Rust community's evangelism, but that might just be my personal experiences with Rust community members.
Other languages usually need a large number of dependencies, with Ruby and Node, often an entire build environment, with plenty of potential for dependency hell and hours wasted.
Some may advocate containers at this point, but it just hides the issue temporarily and may be too much for a certain category of end users. You now need to know how containers, ports, volumes and Linux systems work in far more detail when you actually just want to use an app.
Or look at Python, which is also compiled. Or Ruby, or JavaScript, TypeScript, Dart…
Does not matter where the implementation comes from, if it is free or commercial, what matters is that it exists.
Turbo Pascal compilation speed, in MS-DOS, using 90’s hardware was already faster than Go.
There are lots of languages with modules support, with static linking and native compilation to choose from.
In any case it doesn't change the fact that Go's compilation speed is nothing to brag about, it has been done before in many other languages, Turbo Pascal was just one example.
If you wish I can provide other examples of languages that compile as fast, on such old hardware while matching Go's compilation speed, with richer language features.
What relevance does this have on the compiler landscape today ?
If you have to use a compiler from ~30 years ago to find a comparison supporting your claim, it sounds very much like Go is indeed much faster than what it competes against today.
If you want the 2017 version of it, it is called Delphi. Beats Go in language features and compilation speed.
Go's compilation speed only surprises those developers that never used anything else beyond C and C++.
And beat 99% of other compilers today, meaning that overall compiler complexity has grown.
>If you want the 2017 version of it, it is called Delphi.
Ok, this is something actually relevant.
>Go's compilation speed only surprises those developers that never used anything else beyond C and C++.
For me (tm), Go compilation speed has compared equal or favorably against C, C++, Java, C#, Rust at least.
Which ones?
> For me (tm), Go compilation speed has compared equal or favorably against C, C++, Java, C#, Rust at least.
Since when does Go compile faster than Java and C#?
When I hit Ctrl+S my binary is already on the disk, thanks to incremental compiler integration on the IDE.
I have a full blown WPF application with multiple plugins, including data visualization, talking to Oracle and Postgres, total compilation time after check out 12s.
Eiffel, D, Nim, Jai are other fast compilation examples.
Java 9 added linking support for custom runtimes.
There are other C compilers to choose from, with libc implementations that properly support static linking.
I like it when they have a complaint but can see why the trade-off was made.
I don't like it when they're obviously parroting HN group-think.
I really don't like it when they have no complaints at all, but are able to recite the marketing happy-talk verbatim.
I admire people who can spot such things effectively and steer discussions in an productive manner. I see now that this is not really about interviews anymore but just everyday discussions.
I think for many people, me included, it's flawed but good enough for the job and fun.
Remember that Go is still a niche language, and the majority of programmers will never write a single line of Go.
There is a nice trend around Go nowadays, but most people are still writing PHP, Python or Java and Go isn't going to replace any of those.
Languages don’t get replaced, people just don’t use them as often for new projects.
Ouch, the lack of historical accuracy of your comment is painful. Just a few points :
- Sun Microsystem was founded in 1982, it's far from being a dot-com start-up.
- Java was already ubiquitous by 2000, it was embedded in your phones, your credit cards, in your browsers thanks to applets etc.
- in fact it did replace COBOL or C++ for a wide number of applications, not everywhere but it still had a enormous impact on the industry. Netscape even went as far as re-implementing their whole browser in Java[1]. It was a bad idea, but that gives you an idea of the revolutionary impact Java had.
Go is nowhere near where Java was in 2000, by several orders of magnitude. It's not a criticism of Go, I don't even think we'll ever have a language as popular as Java in that time, because in the 90s there was a massive window of opportunity for a language that was at the same time : safe, portable, and licence-free.
[1]: https://www.cnet.com/news/netscape-sharpens-javagator-plans/
Among the languages that came in last 10 years Go is most popular with exception of maybe Swift.
So compare to marketing juggernaut Java with billions sunk in by leading enterprise vendors Go is nowhere. But among non corporate driven language Go is definitely on top.
Go is indeed one of the most popular of the last 10 years, but I don't think it's the most popular one. Swift is way ahead (because of the iOS walled garden), and Typescript is probably more popular than Go (or at least in the same ballpark).
> But among non corporate driven language Go is definitely on top.
Go, «non corporate driven», really ? OK it's not «corporate-driven» like Java, but I don't think anyone would be using Go if Google wasn't behind it. I really think the impact of marketing in Go's success is bigger than its value-proposition (I'm not saying that Go doesn't have a value-proposition, I'm just arguing that marketing played a really big role in its adoption). Consider for instance the microscopic mindshare that Pony[1] has, despite being «Go from the 21th century» with a sound type system and a data-race-free concurrency model.
Pony is also pre-1.0, and it doesn't look much like Go to me.
What I remember from the time was that C and C++ was everywhere, and Java was this weird new thing with a bunch of promises that ran slowly (because the JIT wasn't standard until later). There were a lot of people who were dismissive of Java, which was stupid, and there are a lot of people today who are dismissive of Go, which doesn't make sense to me either.
What are the alternatives if you want something with type checking? Java? No, thanks. Haskel? Where are the libraries? C/C++?
I guess Typescript is the only alternative
The VO's I use trow exceptions when you construct them with some bad value. This is great because when you use for example a natural positive integer object you are sure it is one.
So now I have 'type checking' and more secure code in PHP.
http://php.net/manual/en/functions.arguments.php#functions.a...
And it is still the case with type declarations, that they make your code actually slower, because the runtime adds asserts in your code which gets evaluated at runtime?
But yes, if you're working on a modern PHP project, there's a lot to love: A solid module system, an enormous sea of high quality libraries, type checking, a really nice deployment and scalability story, decent performance, good tooling (IDEs, debuggers, etc.), a servicable C-style syntax. For many purposes (not all!) it's ten times better than, eg, nodejs. (Which might seem like a low bar, I admit...)
I quite like Typescript as far as syntax goes, but I think PHP 7.1+ is comparable. And PHP has a lot more support, libraries, and better tooling in my view. For example, my experience in node land is there aren't really any good ORMs; PHP has multiple, including one (Doctrine) which is easily the equal in my view of the highly regarded Python SQLAlchemy. Similarly with routing, frameworks, templating, etc., there's a huge amount of maturity on the PHP side that's missing from node.
The big question is going to be in the process model. Node has an event loop; PHP doesn't. For most purposes, I think an event loop makes writing good code harder to no real benefit, but in some cases (eg, acting as the endpoint for a ton of open websockets) it can be a big win. If you do need that, then you should probably lean towards node over PHP, and sure, why not use typescript? But for the general case, I'd still lean towards PHP.
(Then again, there's also a ton of other languages and frameworks. Just because PHP - or node - might be better than the other for some task doesn't mean there aren't a dozen more languages better than both.)
It's still the same as C, which is _not_ a solid module system.
Though it has improved dramatically.
> Haskel? Where are the libraries?
Well, I suppose the same drawback would apply to Pony. :)
There's Nim and D too, but I get the lack of big commercial backing could disqualify them.
https://github.com/PatrickLouys/professional-php-sample-code
As for libraries, what matters is if the desired use case is covered, not winning the App Store count.
What libraries are missing? The only issue I've had with libraries are that some client libraries are wrappers over C libraries and this makes static linking difficult (or seemingly impossible on a Mac)
A few years ago there was a lack of libraries in some areas but that's not the case these days.