Zig - A Newcomer To TIOBE Top 50
Written by Sue Gee   
Monday, 10 April 2023

Zig is a fledgling programming language being developed by Andrew Kelly as a replacement for C. You may never have heard of it, but it is in the news this week because it has been listed for the first time in the Top 50 of the TIOBE Index.

tiobesq

The TIOBE Index gauges the popularity of programming languages based on the number of searches made for them. The INDEX was initiated by Paul Jansen, CEO of Tiobe Software in 2000 and is updated on a monthly basis.

While we regularly report on the latest TIOBE Programming Language of the Year - most recently it was C++ - and comment on languages joining or leaving the top 10, see last month's report Go In Top 10 On TIOBE Index, we rarely comment on languages lower down the index than the Top 20. But the April 2023 headline from Paul Jansen which reads:

Programming language Zig enters the TIOBE index top 50

seemed worth relaying, as is his comment:

there is another remarkable competitor of C and C++ entering the top 50. No, it is not Google's highly promoted language Carbon, which is only at position #168. It is the programming language Zig. Zig is a very pragmatic language that interacts smoothly with C/C++ programs, thus making it is easy to migrate from C/C++ to Zig. It has all the nice features of C and C++ (such as explicit memory management enhanced with option types) and has abandoned the not-so-nice features (such as the dreadful preprocessing). Entering the top 50 is no guarantee to become a success, but it is at least a first noteworthy step. Good luck Zig!

Looking at the index, Zig is in #46 with a score of 0.19%. This puts it below Groovy at 0.20% but above Prolog at 0.18% and Bash at 0.17%.

So what more do we know about Zig?

It's website, ziglang.org states:

Zig is a general-purpose programming language and toolchain for maintainingrobust, optimal and reusable software.

ziglogoAccording to Wikipedia:

Zig is an imperative, general-purpose, statically typed, compiled system programming language designed by Andrew Kelley. It is intended to be a replacement for the C programming language, with the goals of being even smaller and simpler to program in while also offering modern features, new optimizations and a variety of safety mechanisms while not as demanding of runtime safety as seen in other languages. It is distinct from languages like Rust or Carbon, which have similar goals.

From its GitHub repo it appears to be a very active project open source overseen by the Zig Software Foundation, set up in 2020 to facilitate sponsorship for the project. The current release is 0.10.1 which was released in January 2023.

When it first appeared in February 2016, Andrew Kelly posted an Introduction to the Zig Programming Language in which he wrote:

my goal is to create a new programming language that is more pragmatic than C. This is like to trying to be more evil than the devil himself.

So, in order, these are the priorities of Zig:

1 . Pragmatic: At the end of the day, all that really matters is whether the language helped you do what you were trying to do better than any other language.

2 . Optimal: The most natural way to write a program should result in top-of-the-line runtime performance, equivalent to or better than C. In places where performance is king, the optimal code should be clearly expressible.

3. Safe: Optimality may be sitting in the driver's seat, but safety is sitting in the passenger's seat, wearing its seatbelt, and asking nicely for the other passengers to do the same.

4 .Readable: Zig prioritizes reading code over writing it. Avoid complicated syntax. Generally there should be a canonical way to do everything.

To know more about why and how Kelly embarked on the project and see a brief demo of the language, watch this Code Free interview with him from 2021:

Can Zig stand in the face of Rust?

Do we need yet another language attempting to overthrow C?

Isn't GPT n+1 going to make all languages redundant?

What's wrong with C anyway?

No, I didn't really mean the last one, we all know what is wrong with C. Languages and their success or not is one of the great mysteries of the universe - it certainly isn't much to do with logic. Could it be that Zig is just a cool name? As they say, watch this space.

More Information

TIOBE Index

Introduction to the Zig Programming Language

ziglang.org

zinglang on Github

Related Articles

Go In Top 10 On TIOBE Index

C++ Is TIOBE's Language Of The Year

 

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

 

Banner


Advent Of Code 2024 Now Underway
01/12/2024

December 1st is much anticipated among those who like programming puzzles. It is time to start solving small but tricky puzzles on the Advent of Code website with the goal of amassing 50 stars by Chri [ ... ]



Fermyon's Spin WebAssembly Version 3.0 Released
26/11/2024

The open source developer tool for building, distributing, and running serverless WebAssembly applications reaches version 3.0. What's new?


More News

espbook

 

Comments




or email your comment to: comments@i-programmer.info

Last Updated ( Monday, 10 April 2023 )