Channels ▼

Christopher Diggins

Dr. Dobb's Bloggers

What Do We Need From a System Programming Language?

March 10, 2010

There are a huge number of programming languages to choose from, but only a few are described as system programming languages. If we could have anything we want from a new system language, what would it be?I recently announced the first Alpha release of the Heron programming language 1.0 on Artima.com. I talked a bit about the evolution of the language design over the course of the last five years. Some people who remembered the language from back when, commented on how they were a bit sad to see it become less of a systems language and more of an enterprise type language.

I think that the Heron feature set would permit it be used as a system language, but it would require this to be clearly demonstrated. I am thinking that the next steps for Heron are going to be implement a Heron to C or C++ compiler. This might be a good way to prove the viability of Heron with all of its fancy-pants features being used a system language.

The term "system programming language" is not super well-defined. Most of us "know it if we see it". Some programming languages that I consider to be system languages are: C, C++, Modula-2, Oberon, Fortran, D, Forth (am I missing any?). My rather unscientific criteria for a system language is: can you write an OS with it, without having to heavily rely on a foreign function interface (FFI) to C?

So I asked Nemanja and Achilleas on the Artima discussion forum of Heron what they would look for in a system language, and here is my take on their wish-list combined with my own:

Must have features

  • compilation to native platform binaries
  • tight control over resource management (e.g. optional garbage collection)
  • compile time code execution
  • typed memory management
  • direct access to system resources
  • efficiency both in CPU and memory consumption.
  • no hard dependency on a runtime (e.g. VM or library)
  • all high-level abstractions strictly follow "pay only for what you use" policy (e.g. polymorphism, closures, RTTI)
  • deterministic resource deallocation
  • a very static ang strong type system that would catch as many errors as compile time as possible

Nice to have features

  • type deduction
  • full support for functional programming
  • simple FFI to C
  • full support for dangerous actions like pointer arithmetic, but *not* defaults.
  • a context-free grammar
  • side-effect detection and enforcement
  • explicit signature-based polymorphism
  • A rich set of standard libraries that can be optionally linked if needed.
  • A choice of static and dynamic linking should be provided

I found this to be an insightful wish list of features. It is definitely helping to guide my thinking about some features of Heron. What features would you expect from a modern system language?What features would you expect from a modern system language?

Related Reading


More Insights






Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

 
Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.
 


Video