top | item 38282097

Ask HN: What do you want to see in a systems programming language?

9 points| rpnx | 2 years ago | reply

I am working on a new systems programming language, similar to C++ with syntax that somewhat resembles Go or LLVM in some ways. While it isnt quite ready (at least a month away from alpha release), I am curious what features are the most desired in a systems programming language. I'd like to get inspiration for new language features. Pain points with C++, Rust, C, Zig etc.. What you like, don't like, etc.

22 comments

order
[+] simonblack|2 years ago|reply
A quick and easy way to add peripherals.

That's more than just device-drivers, you have to work out a consistent interface between the 'system' and all of the peripherals, rather than looking at the individual interactions of the system with individual peripherals.

In a way, you need something like the UNIX concept of 'everything is a file'. (Only more so.)

My hobby is writing emulators for real machines from the past. Most of my effort is in emulating the peripherals interactions with the CPU and RAM.

I have recently been looking at minicomputers of the 1970s. They seem to have had the concept of the peripheral doing all the work, with the 'system' merely 'asking a limited number of code questions' and the system 'getting a limited number of answers' from the peripherals.

[+] rpnx|2 years ago|reply
I'm not sure that that is much related to systems programming, that sounds like a pretty high level library feature.
[+] tomcam|2 years ago|reply
That is an operating systems thing, not a language thing
[+] billconan|2 years ago|reply
I want documentation, especially block diagram be the first class citizen of a programming language, such that parsing the code will generate project visualizations that can help me understand the big picture.
[+] rpnx|2 years ago|reply
I suppose you could produce documentation as a compilation byproduct. But I am not sure that is within the scope of a "programming language".
[+] mikewarot|2 years ago|reply
A same way to handle strings, or return a complex structure without having to preallocate a buffer to write into, etc.

Clear semantics for dealing with threads and multiple cores.

Static type checking

[+] rpnx|2 years ago|reply
Sounds like C++11 onwards. I plan to include all of those features of course.
[+] efferifick|2 years ago|reply
I will be in the minority here, but:

Native integration with Datalog.

Many times, I find myself working on a program and I realize that what I need is a database. But having a database, even sqlite3 or Berkely DB, would be an overkill. If I could just express my data and the relationships between them, then I would be able to query what I need in an efficient way.

[+] AlectronikLabs|2 years ago|reply
I would love to see a systems programming language with classes which were usable on bare metal, like with c++ and unlike e.g. D or free pascal where a runtime is required.

Any homepage of your project @OP to check for the alpha?

[+] rpnx|2 years ago|reply
I registered rylang.net, but I have not put anything there yet. I'll put something there when I get further along. Only just added destructors for now.
[+] b20000|2 years ago|reply
i never heard the term “systems programming language” before. is that a FAANG invention?
[+] AlotOfReading|2 years ago|reply
It's had its current meaning at least since the 60s with IBM and PL/S. I wouldn't be surprised if it was regularly used even before that though.