top | item 44149049

(no title)

avestura | 9 months ago

Maybe I have a too strict definition of systems programming languages, but I would never call a GC language a systems programming language. Who would use an operating system that suddenly stops the entire world because some random language's runtime wants to collect its memory garbage?

That said, well done for making this.

discuss

order

ksec|9 months ago

>but I would never call a GC language a systems programming language....

Lilith: x86-64 OS written in Crystal (github.com/ffwff). [1]. And Crystal has GC.

[1] https://news.ycombinator.com/item?id=21860713

ac130kz|9 months ago

Probably they meant that GC introduces a certain level of uncertainty, whereas OS or "systems" programming leans heavily towards manual handling (except when the compiler allows to avoid it, not the runtime).

hualaka|9 months ago

I think you have some stereotypes about GC. In fact, current GC technology only requires a very short STW. Of course, I agree with your opinion, so this is not the final form of nature. I will find a better technology to assist GC.

virtualritz|9 months ago

I think it's rather the other way around. What parent said, even though they prefixed it with a 'maybe' to make their statement less confronting, is that you used the term "systems programming language" too freely. As is also the case with Go.

If people keep doing that, the term will eventually loose meaning. Maybe in 20 years, it will have eroded enough that something like Python will be called a "systems programming language". I mean after all, a printf statement in C also parses the format string at runtime. Who is to say the fact that all of the code is interpreted should thusly exclude something like Python? I'm being sarcastic, if that wasn't obvious.

Nature claims 'concise'ness in it's README's opening paragraph. That is laudable. It's even more laudable if the conciseness would also be reflected in the use of natural language (no pun) that describes it.

Calling it a "systems programming language" while using GC is IMHO eroding the meaning of the term.

Something meaning X and someone including Y and then someone pointing out that X does not include Y has thusly nothing to do with stereotypes here.

MangoToupe|9 months ago

Tbh, I've completely abandoned the concept of a systems programming language because the primary benefit of the concept seems to be to argue over it. There's practicality (eg can i link this into the kernel?) and then there's hand-waving about how it feels to a developer, and the conversation seems almost entirely subsumed by the latter.

See also: "is C a high-level or low-level language?" Just shoot me instead, please.

js8|9 months ago

Somewhat agree, but it depends. I agree that core of the operating system (kernel) should be responsive, but there are many tasks in the operating system that don't require immediate response and can be run in batch. Usually these are higher-level decisions, such as any housekeeping tasks like file backup and indexing, workload reprioritization and optimization, system update and reconfiguration, and the like.

lionkor|9 months ago

Yeah, then you write a GC or use a library ;)

Tabular-Iceberg|9 months ago

Isn't this a problem of allocating and freeing resources being generally non-deterministic, regardless of what algorithm is used?

WhereIsTheTruth|9 months ago

From the website:

"Nature is... A general-purpose open-source programming language and compiler designed to provide developers with an elegant and concise development experience, enabling them to build secure and reliable cross-platform software simply and efficiently."

avestura|9 months ago

That's true. However the website also promotes it as a systems programming language here and there. For example in the same homepage it says "Perfect for Systems Programming: Operating systems and IoT" and some other places like here: https://nature-lang.org/docs/get-started

heavyset_go|9 months ago

Define operating system, the higher up the stack you go the less things like GC matter.

I wouldn't care if my network daemon was written in Python or not, but I would care if the networking stack itself was.

repelsteeltje|9 months ago

> the higher up the stack you go the less things like GC matter.

But suppose the very top of stack is high frequency trading system or traffic light controller. Car brakes...

Depending on your stack, determinism may or may not be a key part. And that is only possible if determinism is guaranteed all the way down.

alexpadula|9 months ago

Wowow. GO to not be used with systems programming? Absurd.

surajrmal|9 months ago

go is ill suited for many systems programming environments. It works well on servers and larger iot devices with 512+ mib off ram, but not great on things with tighter constraints. We tried to use it for our netstack implementation for years and ultimately came to the conclusion we needed to switch to a language with greater control. Storage, RAM, and CPU usage were all improved with the switch. I don't consider it a systems programming language but rather something approaching systems programming.

alexpadula|9 months ago

My jaw dropped when I read your comment.

9rx|9 months ago

If your program isn’t a system, it is unlikely that you need to worry about freeing memory at all — It will be cleaned up when finished.

Zefiroj|9 months ago

in a sense, RCU is garbage collection.