Gitlab's history with $faster_language has at least some background documentation, e.g. https://about.gitlab.com/blog/2016/04/12/a-brief-history-of-....
They seemed to have liked it, as at least a couple of other services are written in $faster_language - gitlab-shell and gitaly (probably, several others).
There may be more static languages nowadays, but they're very young - I think in real world, there wasn't, pragmatically, a lot of choice, although today's young languages are... still young :)
It doesn't mean a project is doomed simply because it chose Go. That said, Heroku tried to do a major Go rewrite of their entire backend and the project failed miserably.
var lst = users.stream()
.filter(User::isAdmin)
.map(u -> u.id() + “ : “ + u.name())
.limit(10)
.toList();
static boolean isPrime(int n) {
return switch (n) {
case 0, 1 -> false,
default -> !IntStream.range(2, n).anyMatch(i -> n % i == 0)
}
}I came away liking C++ more than I thought I would. I didn't find it hard to learn but it was time consuming. Where learning Rust I never understood the basic concepts enough to be productive, I could be productive pretty quick with C++.
The trouble is there is a lot to learn because the language is just so old and has been through so many revisions. To some extent you can't just limit yourself to the modern stuff since in order to learn the modern stuff you need a basic understanding of what it was before to know why things are done the way they are now. You also run into code samples that use the old stuff or corner cases where they're needed.
I also think it really gets you to think about how computation and memory is happening at the metal level which is great for optimization but I think for most of the work I do it would be largely a distraction. I see this is a downside, not an upside.
That said, you're definitely right. You can have nice, expressive code in C++: I just think the learning curve is the biggest problem. I'd be happy to use C++ in my next project though.
I should spend some time actually learning modern Java and less time avoiding it.
func IsPrime(n int64) bool {
return big.NewInt(n).ProbablyPrime(0)
}
Each language has its own pros and cons. Go wants to be explicit and simple to be understood. Java is fully-featured.This is just anectodal evidence anyways. And these are tools in the and, and no point for a "tool fight".
new BigInteger(n).isProbablyPrime(0);(Specifically cases where you want the project easy to jump into with almost no toolchain setup.)
The fact that "Ruby developers already basically know the Crystal syntax" is a selling point for Crystal, but if people are already evaluating a switch to another programming language, that's just one of many factors that must be considered.
People use Ruby because they like the way it works, not because of the syntax.
It's definitely lacking in the web ecosystem department but the language is a joy to use and incredibly fast.
I think people focus on the superficial similarity of Crystal, without thinking what semantics need to be the same for it to use usefully similar. And those semantics aren't there, so it doesn't matter if it sorts of looks the same and includes most methods.
I feel like if it was tractable to run Rails on Crystal then someone would have done that.
Last I heard (which was years ago) it was pretty much a solo project.
That said, the demo is really something and I like what they're doing. I hope one day it becomes my language of choice.
I don't think it's necessarily the wrong decision but you have to decide if it's right for your project.
Most C# apps I've worked on in the last 5 years are deployed to Kubernetes.
- EFCore is MSSQL first, even if other options are provided
- Many libraries ship with two implementations: an over-engineered Windowsy version that barely works (with a big scary warning that it should never be used in production), and a thin wrapper around some Azure service
- Important tooling like the debugger (which wouldn't be so necessary if .NET had halfway decent support for printf debugging, but here we are...) is locked to be compatible with VS and (MS' build of) VSCode, despite both of them using supposedly open (and Microsoft-pushed!) standards like DAP
- The community is really culty, the response to "X is broken when using the non-MS-Stack alternative" always seems to be "well use the standard MS solution then"
- It's practically open source in name only, because the build engineering is so convoluted that it's nearly impossible to find the canonical source code of core features like the standard libraries
- "Many libraries ship with two implementations..." I've yet to come across these "many" libraries in the 5 years since I've been building services with .NET Core.
"The community is really culty" - I'm not sure where this is coming from. It's hard to refute such vague criticisms.
- "It's practically open source in name only" - Here is the base class library source: https://github.com/dotnet/runtime/tree/main/src/libraries or https://github.com/dotnet/corefx/releases (depending on what version you're looking for)
1. https://docs.microsoft.com/en-us/ef/core/get-started/overvie...
Maybe our definitions of open source are different, or maybe you're just shitting on Microsoft for your own reasons. Regardless of whatever your experiences have been with .NET in the past, they don't mirror the majority of the folks that use it everyday.
Graphical tooling to deal with process dumps, etw data, and profiler information only available on VS.
What projects? None of those are forced on you or have any references to them built into .NET Core. I've been building .NET apps since 1.0 reached beta (in 2001?) I can count on one hand how many times in total that I've worked with those systems. This argument is a hell of a reach.
> GUI frameworks out of Redmond The upcoming Microsoft MAUI is cross-platform (no, Microsoft isn't building support for Linux, but there are open source efforts working on it.)
You can use https://avaloniaui.net or https://platform.uno
> Graphical tooling to deal with process dumps, etw data, and profiler information only available on VS.
https://www.hanselman.com/blog/dotnettrace-for-net-core-trac...
There's also https://github.com/SachiraChin/dotnet-monitor-ui
You can use JetBrains rider to profile in Linux/MacOS as well: https://www.jetbrains.com/help/rider/Profiling_Applications....
If you don't want to use .NET, you obviously don't have to.
Ruby is faster to write and more concise by a long shot—certainly if we're talking back-end web services. I prefer Go to Ruby generally but it's weird that Go developers tend not to even see how much yak shaving is involved with it. Or really any downside with it.
Try writing this in Go:
records = User.limit(10)
records.select { |user| user.is_admin? }.map{|user| "#{user.id} : #{user.name}"} records := Stream.Limit(User, 10)
records.Select(func(user User) bool {return user.IsAdmin()}).Map{func(user User) string { return fmt.Sprintf("%d %s", user.id, user.name) }
Yes a bit more verbose, that is the price to pay for static typing without full type inference as in the ML language family.https://go.googlesource.com/proposal/+/master/design/go2draf...
records.collect({case u if u.isAdmin => s”${u.id} ${u.name}”}).take(10) guess the language
That line of code could be Scala, or something else.
In any case, the point is that there are compiled languages that offer similar productivity like Ruby, with AOT/JIT compilers out of the box, and great IDE experiences.
In Go, the intuitive way would be one loop with an if inside it. So it would be easy to spot this performance issue if you did it the ruby way with two loops.
https://go.dev/play/p/ixDKuosxPNp
I bet I wrote my for loop as quickly as you wrote your map. The character count isn't that much higher.
The more important thing is the ruby version is chainable and more readable—and that matters far more often.
> more readable
Without having more context, User in your code is possibly an ActiveRecord class, so to read the #select, you have to consider that it could be radically different and heavier than Enumerable#select (eg. it may execute a DB query as a side effect). So I like your example still, because it’s representative, and certainly expressive, but not readable per se. IMO this sin here is simply that ActiveRecord shouldn’t have overloaded select.
Using an ORM was a poor choice on my part. I agree the magic there does harm readability since it makes it a lot harder to understand what it really is doing.
In fact given that only a subset of users will be admin users for the second loop n is going to < 10 anyway.
I believe it was Rob Pike that actually said something along the lines of not bothering to optimise until you know that n is large[2].
* Rust - I do not understand the borrow checker at all and I'm a senior engineer at FAANG. I can barely write a simple function in Rust. I've struggled more learning Rust than any language (and I can write C and C++ just fine!)
* Go - I like Go, but there is a ton of boilerplate involved with writing it. Ruby is far more concise and you can get straight to business logic.
* Java - Even more boilerplate
* C/C++ - I think Ruby clearly wins on productivity here