News for hackers. Stuff that matters.
Re:Rust: A Critical Retrospective by fulafel on Thursday May 19, 2022 @10:46AM (#31435354)
From the modern systems programming languages set, Go does better in this respect. But admittedly it doesn't reach to quite as low in fitness for low level programming as Rust.
Re:Rust: A Critical Retrospective by jerf on Thursday May 19, 2022 @10:55AM (#31435477)
Oh, not even close. It does what most languages do and just elides, ignores, or hard-codes the answers to all the questions Rust has. That's a solution, sure, a very valid one chosen by many languages over many decades, but certainly not "much better". We absolutely need at least one language that doesn't hide all that and I think the programming language community as a whole will really benefit from the list of choices for that being expanded from "C++", which is getting really long in the tooth And I'm not even sure C++ was ever really designed to be this language, I think a lot of it just sort of happened by default and it sort of backed into this role, and frankly, it shows. Rust being designed for this can't hardly help but be nicer, even if we completely ripped out the borrow checker aspect.
Re:Rust: A Critical Retrospective by veber-alex on Thursday May 19, 2022 @10:49AM (#31435388)
Go is not a systems programming language.

I also personally find Go syntax to be horrible, especially now with generics.

Re:Rust: A Critical Retrospective by pjmlp on Thursday May 19, 2022 @01:15PM (#31437358)
Depends if one considers compilers, linkers, networking stacks, kernel emulation, unikernels, userspace drivers, databases, GPGPU debugging systems programming or not.

I personally consider better use Go than C for such purposes, even if they aren't "systems programming".

Re:Rust: A Critical Retrospective by Thaxll on Thursday May 19, 2022 @12:09PM (#31436506)
The Go syntax is fine and easy to read, you don't need to know Go to undertsand what the code is doing, can't say the same for Rust.
Re:Rust: A Critical Retrospective by ohCh6zos on Thursday May 19, 2022 @12:41PM (#31436899)
I think this is a matter of opinion not fact. I have worked as a Go programmer for three separate companies and it may be the least readable, least understandable language I have encountered.
Re:Rust: A Critical Retrospective by Thaxll on Thursday May 19, 2022 @04:00PM (#31439408)
Well it's hard to argue against a language with 25 keywords.
Re:Rust: A Critical Retrospective by weatherlight on Thursday May 19, 2022 @10:49AM (#31435386)
Go is a systems programming language?
Re:Rust: A Critical Retrospective by tptacek on Thursday May 19, 2022 @01:52PM (#31437902)
Yes. The only people for whom this is controversial are message board nerds. The actual language designers don't have much trouble over the concept. Here's a link to the designers of Rust, C++, Go, and D on a panel having little problem working through the nuances:

https://news.ycombinator.com/item?id=31227986

This perpetual debate reminds me of the trouble HN used to have with the concepts of "contractors" and "consultants", where any time someone mentioned that they were doing consulting work there'd be an argument about whether it was in fact contracting. It's a message board tic, is what I'm saying, not a real semantic concern.

Re:Rust: A Critical Retrospective by monocasa on Thursday May 19, 2022 @05:25PM (#31440369)
To be fair, that first question about 'what is a systems programming language' is answered by Rob Pike then Andrei Alexandrescu as

Pike: When we first announced Go we called it a systems programming language, and I slightly regret that because a lot of people assumed that meant it was an operating systems writing language. And what we should have called it was a 'server writing language', which is what we really thought of it as. As I said in the talk before and the questions, it's turned out to be more generally useful than that. But know what I understand is that what we have is a cloud infrastructure language because what we used to call servers are now called cloud infrastructure. And so another definition of systems programming is stuff that runs in the cloud.

Alexandrescu: I'm really glad I let Rob speak right now because my first question was 'go introduces itself as a systems programming language' and then that disappeared from the website. What's the deal with that? So he was way ahead of me by preempting that possible question.

So it seems to me that they struggle with the nuances of the concept as much as the commenters here, particularly as it pertains to Golang.

Re:Rust: A Critical Retrospective by pjmlp on Thursday May 19, 2022 @01:16PM (#31437383)
Depends if one considers compilers, linkers, networking stacks, kernel emulation, unikernels, userspace drivers, databases, GPGPU debugging systems programming or not.

Despite my opinion on Go's design, I rather would like to see people using Go instead of C for such use cases.

Re:Rust: A Critical Retrospective by yakubin on Thursday May 19, 2022 @07:44PM (#31441665)
To be fair, compilers and linkers can be thought of as pure functions (if we ignore stuff like including timestamps in builds e.g.). They have no special requirements language-wise. You can write them in any general purpose programming language. Even Brainfuck will do (for one-file programs fed through stdin). No argument about the others though.

Although I guess JIT compilers may be classified as systems programming, since you need to do some OS-specific tricks with virtual memory during execution of the compiler.

Re:Rust: A Critical Retrospective by fulafel on Thursday May 19, 2022 @11:10AM (#31435718)
Yes, as it's used for that a lot. Eg many databases (CockroachDB, Prometheus, InfluxDB, dgraph etc), gVisor, Kubernetes, Fuchsia, etcd, and so on. And also in the origin story it was aiming to compete with C++ for many use cases IIRC.
Re:Rust: A Critical Retrospective by mindcrime on Thursday May 19, 2022 @12:08PM (#31436497)
That's tricky to answer, because it depends a lot on what you count as "system software". If you mean literally "the operating system", then arguably not. But if you include middleware, databases and other "infrastructure" stuff, then arguably yes.
Re:Rust: A Critical Retrospective by jandrewrogers on Thursday May 19, 2022 @04:34PM (#31439830)
A proper database can be implemented in python -- I've done it -- but that doesn't make it a systems language. A "systems language" comes with the strong implication that it is possible to write an implementation of most software that is competitive with the state-of-the-art in terms of performance, efficiency, and/or scalability. That is only possible in languages like C, C++, Rust, and similar, hence the "systems language" tag.

Languages that are not systems language trade-off this capability for other benefits like concise expressiveness and ease of use.

Re:Rust: A Critical Retrospective by fulafel on Friday May 20, 2022 @01:56AM (#31443860)
Lots of real world systems have other design tradeoffs than aiming to be state of the art in those axis. Eg cost, security, maintainability, adaptability to changes, etc.
Re:Rust: A Critical Retrospective by johndoe0815 on Thursday May 19, 2022 @01:30PM (#31437621)
Go has been used to implement OS kernel code, e.g. in the Biscuit OS from MIT: https://github.com/mit-pdos/biscuit

Of course, the garbage collector did not exactly make it easier - but it's an interesting piece of software.

Re:Rust: A Critical Retrospective by mindcrime on Thursday May 19, 2022 @01:52PM (#31437896)
Go has been used to implement OS kernel code,

but it's an interesting piece of software.

Agreed. And I didn't mean to imply that it's impossible to use Go that way, but I think it's fair to say that it's less common and perhaps even less desirable to do that.

OTOH, people have written (at least parts of) Operating Systems in Java[1] even, so never say never...

[1]: https://github.com/jnode/jnode

Re:Rust: A Critical Retrospective by fulafel on Friday May 20, 2022 @02:13AM (#31443939)
There have been lots of OS written in languages that support GC. And indeed mainstream operating systems use GC quite a lot for selected objects.
Re:Rust: A Critical Retrospective by goodpoint on Friday May 20, 2022 @08:11AM (#31446238)
No, due to its runtime.

You can write a database with it but that makes it an application language, not system.

Otherwise you could call every language a "system language" and the distinction would lose all meaning.

Re:Rust: A Critical Retrospective by UnpossibleJim on Thursday May 19, 2022 @10:58AM (#31435513)
It can be, but I wouldn't recommend it personally:

https://golangdocs.com/system-programming-in-go-1

EDIT: formatting

Re:Rust: A Critical Retrospective by anfilt on Friday May 20, 2022 @03:44AM (#31444469)
Yes it is, but not a a good low level systems language mainly due to garbage collection and runtime requirements. It still is used for writing keyword here systems.