...is not IMHO. There needs to be a much smaller, simpler, "better C" language than Rust to replace C. Something like zig, or C2, even C99 almost feels like a new language.
I'm not convinced you can be much simpler than Rust while maintaining memory safety without GC (including reference counting) while still having standard heap allocation and deallocation. If you throw out memory safety, then sure, you can be simpler.
I'm looking forward to exploring this space in the next 1-2 release cycles of Zig. I have some ideas that will make debug and release-safe builds of zig code actually safe with regards to use-after-free and related memory issues.
The programmer will still be required to adhere to C-like manual memory semantics, with the difference being the language runtime catches safety mistakes. And then of course in bottlenecks the safety checks can be omitted.
If I accomplish my goal, the difference between safety/performance trade-off of Rust and Zig will be that Rust's release mode is both safe and fast, whereas Zig code has the simplicity but the programmer has to choose between performance and safety per scope.
I would still put Go into the "better C" language group because of its elegance and simplicity, even if it can't be used for all scenarios C can be used for (because of the GC).
To me at least, Rust looks like an obvious attempt to fix C++'s problems for large scale software development, but at the cost of being a big and complex language, similar in scope to C++. "Modern C" is a much simpler and elegant language, even though there's some decades old cruft, overall it remained a lot cleaner than C++ because there hasn't been so much stuff added in the first place which would be a burden now.
I sincerely can't fathom how Go can be considered a "better C". It's like comparing cars to sheet metal (or some better analogy).
Go is fundamentally incompatible in most contexts C would be your go-to. A moderately heavy runtime with both a scheduler and a GC unable to compile down to a ".so"? C++ and Rust can both do those things readily.
Languages aren't just syntax/semantics, they're ecosystems within ecosystems. They fill niches with particular their capabilities.
A more appropriate comparison is Go to Java. Distict approaches to "half batteries included" robust application and service development.
Not even. Golang lacks the expressiveness and vast standard library in Java (e.g. nothing even close to what java.util.concurrent has), not to mention the very diverse ecosystem, tunable high performance GCs, and management capabilities of the JVM.
I'm not sure they are. golang was force fitted into writing applications it was not meant for. It was made to be a C++ replacement, but it ended up anything but (basically ended up as a Python and NodeJS replacement).
I can see golang being useful in smaller tools that have some networking capability (and with GraalVM+AOT, Java fills in that niche as well). However, with anything slightly more complex (including REST APIs), and it falls way short. So it shouldn't be compared to Java.
Python/NodeJS/Java/Ruby/Go all have a solid presence in the "I need to spin up a REST/SOA/gRPC/glue service wherever" niche. They each have a range of performance, expression, resource optimality, and ecosystem tradeoffs; but they're all still heavyweights in this particular domain. They each have a presence in other "types" of programming but I think it's also fair to compare them within this one.
Go has a few things which make it especially nice in this field out of the box. Goroutines + channels + select help solve the same class of problems that made reactor patterns, work stealing fork-join pools, listenable/completable futures so popular in Java-land. Go's sockets give you epolling for free where we'd use Netty in Java land.
In fact, they each if those language ecosystems struggle with that class of problem in this field: Good kernel thread utilization in the presence of very mixed cpu + network I/O load. What's why they all have a handful of the same approaches: Ruby/Python/NodeJS all do the reverse proxy on top n processes of of libuv/gevent/whatever event loops (reactor pattern). Java and Go are actually similar in that they actually try to use threads well within a single process.
I say this as an obsessive Java fanboy. I'm jealous of a few Go things I can't have: Goroutines (green threads) and flatter struct+array memory allocations. I can't wait for Loom and Valhalla.
You said it yourself. Once Java gets those, there isn't really much reason left to use golang. And with probably better performance as well (I know the techempower benchmarks have their issues, but if you noticed, golang's standard lib is towards the bottom of the list).
C/Unix is generally largely credited to Brian Kernighan, Dennis Ritchie, and Ken Thompson. Although Ken Thompson did contribute to Go, he appears to have retired early in the life of the project (I can't find any contributions of his that don't pre-date Go's 1.0 release in 2011), and credit for Go instead tends to lean toward Rob Pike and Robert Griesemer, the former of whom worked at Bell Labs, but appears to have joined in time to have more of an impact on Plan 9 than on Unix. In particular Go bears very striking resemblance to Pike's two earlier languages, Limbo and Newsqueak.
https://tour.dlang.org/ is the D tour site, similar to the one for Go and some other languages nowadays; you can run some D example programs right from the site, without installing the language on your machine.
On my blog, I have a handful (12-13) of exploratory D programming posts, that may also be of interest. They explore various basic but interesting features of D via some simple D command-line programs:
This is a misrepresentation of the facts. Zig can use libcurl just as much as C can. Unlike other languages, zig does not need bindings to use C libraries. It's one of the main features.
The issue you linked is saying tht zig standard library will not introduce a dependency on libcurl.
Python, Ruby -> Go. Nim and Crystal are pet project compare to other languages, no support, no community, no libraries, Crystal doesn't even supports Windows or threads. They are in pre alpha stage at best.
I found Nim to have a small but active and supportive community. The library ecosystem, while a little thin, has a lot of activity, and I was able to find what I needed or create wrappers for C libraries.
One difference between the Swift and Nim communities is that where Swift's is full of noobs answering each other's questions, Nim's is full of experts who are just as eager to help.
Nim also has pretty good, fairly complete docs and a decent book.
That's grossly incorrect about Nim. I'm a C/C++ noob and I've found a lot of C/C++/Nim/CS experts answering my questions and helping me out on Nim IRC/Gitter/Nim Forums.
This precisely. Try getting help from the creator of Go, it's next to impossible unless you work at Google or are a core Google dev. The Nim author on the other hand is very active on IRC and the Nim forum.
Right now Go ( among others ) is replacing a lot of Python / Ruby, there is no future for Nim / Crystal in that space anytime soon. Crystal will most likely die, same for Nim I don't have hope about language not backed/ created by large companies.
I'm a bit sick and tired of Google being everywhere and in everything so I'd rather invest my free time in learning a language created by highly motivated individuals than learn Go.
> I don't have hope about language not backed/ created by large companies.
This does not align very well with history. PHP started as Rasmus Lerdorf toy, That didn't prevent it to grow and support some of the biggest platforms on the web. Python was also a one-man band for a while before it gained traction.
Sorry I know I sound pretty negative, it's frustration about people pushing for languages that are clearly not ready and for some of them will never be.
You've got to realise that to a lot of people these languages are already ready. Nim coming closer to 1.0 is certainly evidence that it will soon be ready for a vast majority of users.
Objective-C -> Nim (can compile to ObjC, calls methods directly without overhead)
Python -> Nim (Nim is a super fast python that prevents typos)
Ruby -> Nim (Nim is better in every-way)
JavaScript -> Nim (compiles to plain JS (if you need talk to legacy JS libs like most people) or WASM (if you just want speed))
C/C++ -> Nim (Can compile to C++, calls methods directly without overhead)
Yeah, Nim has impressive coverage of targets. I dislike almost everything about Nim: the syntax, complexity, weird case insensitivity, documentation, community, package manager...Yet this trait alone makes Nim worth leaning for me.
Hmmm , cannot agree with you here:
syntax is great and easy to learn,
complexity crockable in a day or two,
documentation looks good and actively being worked on ,
community is very welcoming and knowledgeable,
package manager nimble is easy to use.
Have you actually tried yet ?
Guest languages introduce additional layers to debug, usually lack in tooling vs platform languages, require additional FFI considerations, their communities tend to create their own libraries and build tools to parallel platform libraries and tools, just to be more idiomatic.
Also they aren't guaranteed to be around forever.
Platform languages stay around while the platform is still relevant.
So, Kotlin is Android's Swift. Outside Android I bet that in 5 years it will be as relevant as Scala and clojure are today.
TypeScript is a wonderful language from Anders, but tsconfig.json allows to change the semantics in multiple ways and it is relatively hard to track down what changed in every release.
F# is only partially supported across all .NET deployment scenarios and VS Tooling. It was even left out of the new WinUI roadmap announced at BUILD 2019, even though .NET Core does support it.
I've seen more Ruby -> Go and Python -> Go myself. I think Go is just pretty well suited to breaking up large monoliths into microservices which is common across the industry.
I don't know if I'd compare Nim to Python precisely; aside from the significant whitespace, I'd say Nim's syntax is directly descended from Pascal, and Nim's philosophy appears to hew more towards TIMTOWTDI than TSBOAPOOOWTDI (although I suppose we could debate whether modern Python still adheres all that closely to the latter). As a result it might appeal more to Rubyists.
Sure (and note that Modula is itself a Pascal descendant, from none other than the creator of Pascal), and although it seems true to say that Nim's significant whitespace was inspired by Python, I don't think there's much else that will be familiar to Python users. Other than "indentation-based syntax", the featured bullet points on the homepage don't describe Python features, and having used Nim lightly (a while ago, mind) my impression of it was very unlike Python. However, it's possible that I'm among a minority of people who think that significant whitespace is very nearly the least important feature of Python.
I've used Nim a bit and even read most of Dom's book (Nim in Action) and it felt pretty natural to me as someone who does most of their coding in Python. Sure it has some Modula inspired keywords, but it still feels Pythonic in a way I can't easily describe.
Rust on the other hand hurts my brain like Haskell as it is so foreign.