Even if it were possible to evaluate all current alternatives, we lack knowledge of the future and therefore can't reliably include important factors such as ability to hire into the team.
I agree, and think that the culture around a programming language is one of the most important attributes, so we should not be afraid to talk about human factors like cultural fit. Your choice of programming language is usually limited to a short list of the ones that have the tools and libraries to support what you are doing, but IMO it's perfectly reasonable to choose a particular language because you and your team like the culture. If you decide to use a programming language in production, you might have to live with it for a long time.
Not perfectly because "best" is subjective. My advice is to let the problem and goals help you dictate (yes, even on hobby projects and even if one of the goals is trying said language). In fact, if you are a hobbyist evaluating languages, you should try them all out with reasonable projects where you can instead of write a post saying how you are moving from a single one to another single one.
I think that's an objectively false statement.
There are many objective metrics by which a programming language may be evaluated. Conciseness, clarity, suitability for realtime applications, and efficiency come to mind.
"It is even possible to "use the best language for the problem"?"
It's certainly possible to use a suitable language for the problem. Some problems are more forgiving than others, of course...
I will say that the idea of a "general purpose" programming language, suitable for most tasks, is a good one. The current multitude of languages, while fun and good for exploring new ideas, is taking a lot of brainpower away from actually producing working systems. Also, I'll claim that there's no reason that most programs shouldn't be written in an efficient language, and in fact there may be a push for that in the name of datacenter efficiency.
It's sad that the most written programming language today is Javascript.
It makes perfect sense. In fact that's what the Go developers themselves found out -- that C++ programmers, who they thought they would be attracted to Go, passed it over, and instead Go gained dynamic language converts.
Considering that Go doesn't even do well (and has horrible library support) for most of the stuff C++ is used for (GUI apps, 3D, AAA games, systems programming, high performance scientific calculations, etc), probably yes.
Now, if you did network servers with C++, probably Go is a better/easier/smaller surface fit.
Some hypothetical "best language in the world" is irrelevant without the tooling and ecosystem around it. "BLITW" still sucks if might as well write the code in Notepad because the editor/IDE integration sucks. "BLITW" sucks if the community consists of 8 people on github.
I hear of Crystal a couple/3 years ago, and it sounds neat on paper - a statically-typed, fast Ruby. Cool, but it's completely meaningless to me because it doesn't fit into any ecosystem that me or most developers care about.
> "BLITW" still sucks if might as well write the code in Notepad because the editor/IDE integration sucks.
We have better editors than notepad that work with any language, and there's plenty of people getting work done with fairly barebones editor setups making no use of language integration at all.
> "BLITW" sucks if the community consists of 8 people on github.
While adoption and library availability are clearly huge factors, they're not necessarily absolute requirements. There are plenty of good (and surely also many bad) reasons why many real-world codebases are practically isolated from the wider community despite being written in a widely adopted language.
If some language was clearly the best in the world, or even just demonstrably superior in a way that is meaningful to whatever your requirements are, it can be a totally reasonable decision to choose that language for your project even though you won't be able to reach to github for a lot of conveniences, you'll have to write code in stock vim and you'll have to invest some extra time to get new contributors up to speed.
I don't know if Crystal is that language, I'm not even in a great hurry to try it to find out, but I feel like if I waited until a language had reached Go levels of mindshare before taking it seriously I'd probably be missing out.
I was ultimately looking for a versatile language that I could use for my personal projects outside of work and thus I was indeed trying to find a single language that could do everything I wanted. Up until this point, that language has been Python.
Go is clearly sufficient for many very successful and amazing projects (many of which I use daily, like Hugo, Terraform, Docker .etc), so developers can still produce excellent tools with its limitations. But in saying that, the language is not for me, and that's okay; if it works for someone else, then that's okay too. Go does lack various features that many developers want, including me.
Fun fact, the blog post was generated by Hugo ... which is written in Go :)
With regards to Nim, yes, my experience with Nim is limited and I am still hoping to learn it further and do a more thorough evaluation. Hopefully I'll spend a good amount of time with Nim in the future to give it more of a fair go.
I really found "still" to be funny because I think for many Go devs (including me) the simplicity and lack of features especially enables us to create more easily.
It's the opposite of standing in front of giant fridge shelves in the supermarket with 100+ kinds of yoghurt where you have a hard time deciding. You only have a few choices so you just go ahead and pick one/just do it.
Forgive my bad analogy.
But when it came to Go, I personally found myself battling the language as a result, rather than being more productive with it.
Ultimately if it makes you more productive, then that's awesome and that's all that matters.
Yeah man, it must be so fun doing large-scale construction work with just a hammer and a shovel; so easy to use, so easy to learn. Who needs caterpillars, pneumatic drills and such.
Last time I checked, Brainfuck is easier to learn than Go (more simplicity!!!, and runs in even more platforms.
I don't agree that Go has only "a hammer and a shovel". It has at least a saw in its toolbox too.
On a more serious note.. fun is highly subjective and the brainfuck / simplicity argument is just useless.
Just like if you're building a small tool to wrap another you might just choose to use bash over Java, it all comes down to what you need most commonly vs what would "be nice to have".
>build large barns entirely
Not the same 'large-scale' construction work I had in mind.
So naturally I used many programming languages with Go's limited set of features, which doesn't mean I want to return to those days.
I started programming a few years later than you.. first on Atari ST (Basic) then later in DOS (Pascal). I often wish myself back to these systems when I see today's bloated stacks of crap (obviously this does not apply to everything).
I don't think this is relevant for the original discussion though..
Even the last version of Turbo Pascal for MS-DOS (7.0) was more feature rich, ignoring the lack of GC for a moment.
type Colours = (Red, White, Blue);
Enumerations in Go type Colours int
const (
Red Colours = iota
White
Blue
)
FFI in Turbo Pascal function Sin(const num: Integer): Double; external 'ext name';
FFI in Go (requires external help from a C compiler) // #include <stdio.h>
// #include <errno.h>
import "C"
func Sin (num uint) float32 {
return C.sin
}
Reference parameters in Turbo Pascal with null safety thanks type system procedure Swap(var a,b:Integer);
var
temp: Integer;
begin
temp:=a;
a:=b;
b:=temp
end;
Swap(x, y)
Swap(nil, y) { compiler error: Got "Pointer" expected "SmallInt" }
Reference parameters in Go (no type safety via type system, manual testing for nil required) func Swap (a *int, b*int) {
var temp = *a
*a = *b
*b = temp
}
Swap(&x, &y)
Swap(nil, &y) { runtime error: Invalid memory address or nil pointer dereference }
I was also tempted to move the time scale from 1992 to 2009, but then I wouldn't be able to reproduce the generics from Object Pascal in Go.Ah, and Turbo Pascal 5.5 was compiling around 34 000 lines/minute in computers whose CPUs were maxed at about 30 MHZ, http://edn.embarcadero.com/article/20803
Regarding nil safety, did Pascal allow something along the line of the following?
var x: ^int;
...
x^ := nil;
Swap(x^, y)They can be used as indexes, range validation, access control in variant records to simulate sum types.
Enumerations are so useless that majority of modern languages have direct support for them.
Yes, it did allow your contrived example, which seldom occurred in practice because proficient Pascal programmers only used pointers when other type safe alternatives weren't possible.
> I plan to only use this language in my personal projects
I think this is more a blog post about what language the author finds most interesting and exciting, not the language the author is suggesting people use for work.
I also tried to highlight its weaknesses in the Caveats section. The language is young and often has breaking changes which would not be suitable for production at this time, particularly in larger organisations.
However, I think the language shows great promise and will appeal to a lot of people as it matures. I'm certainly enjoying it so far! :)
It make senses to half the users of this site. The other half, well, I guess their jobs depend on it not making sense.
I should add that I have no interest in Crystal. It’s just obvious that Go enjoys more success than it technically merits.
Not sure what you mean here, but comparing Go and C negatively (even though quite unrelated) whilst praising C++ makes little sense. Even if you frame it in the way the author did that C++ has classes and C and Go doesn't, Go's lack of classes is no more primitive than any other modern lang w/out classes. And that doesn't even get into arguments on conflating OO and classes. These pro/con discussions always devolve into this mess and can be picked apart, that's why they are rarely worth having at such a high level.
> I should add that I have no interest in Crystal
I have interest in all of them.
> It’s just obvious that Go enjoys more success than it technically merits.
You said more success, the post said Google backing is what "ultimately resulted in its success". Those aren't the same thing. I doubt anyone would disagree that it helps, but I doubt anyone reasonable would agree it is the sole reason why.
It's not like D or Kotlin Native or Swift or others got a fair shake here. These just aren't good posts and I struggle to find any benefit in them.
Dart hardly had any major Google backing, it looked like a way to keep some well known VM researchers busy, which were rescued by the AdWords team before the project kind of folded.
Flutter looks like some of those developers trying to find a killer application for Dart, while being allowed some air time on Google's conferences, while Google management is full speed on Android and Web stacks.
Polymer has never about the framework, rather a way to push WebComponents as sane way to do web development, which up to HTML Templates they have been quite successful regarding adoption across browsers.
I doubt Go is only successful because of Google, but a large corporate sponsor seems to make or break most languages.