{"id":10303,"date":"2023-03-12T09:58:04","date_gmt":"2023-03-12T08:58:04","guid":{"rendered":"https:\/\/monodes.com\/predaelli\/?p=10303"},"modified":"2023-03-12T09:58:04","modified_gmt":"2023-03-12T08:58:04","slug":"modern-c-replacements","status":"publish","type":"post","link":"https:\/\/monodes.com\/predaelli\/2023\/03\/12\/modern-c-replacements\/","title":{"rendered":"Modern C replacements?"},"content":{"rendered":"<p>These days I was just wondering if anyone has compiled a list of &#8220;Modern C replacement&#8221; languages when Slashdot almost read my mind:<\/p>\n<h2><em><a href=\"https:\/\/developers.slashdot.org\/story\/23\/03\/11\/2326237\/meet-zig-the-modern-alternative-to-the-c-programming-language\">Meet Zig: the Modern Alternative to the C Programming Language &#8211; Slashdot<\/a><\/em><\/h2>\n<p><!--more--><\/p>\n<p><!--nextpage--><\/p>\n<blockquote><p>Systems-oriented developers already have programming languages like C, C++, Rust, and Go, <a href=\"https:\/\/www.infoworld.com\/article\/3689648\/meet-the-zig-programming-language.html\">notes <em>InfoWorld<\/em><\/a>.<\/p>\n<p>But now, &#8220;we also have Zig, a newer language that seeks to absorb what&#8217;s best about these languages and offer comparable performance with a better, more reliable developer experience.&#8221; <i>Zig is a <a href=\"https:\/\/github.com\/ziglang\/zig\/graphs\/contributors\">very active project<\/a>. It was started by <a href=\"https:\/\/andrewkelley.me\/\">Andrew Kelley<\/a> in 2015 and now seems to be reaching critical mass. Zig&#8217;s ambition is rather momentous in software history: to become the heir to C&#8217;s longstanding reign as both the go-to portable low-level language and as a standard to which other languages are compared&#8230;.<\/p>\n<p>Currently, Zig is being used to implement the <a href=\"https:\/\/www.infoworld.com\/article\/3688330\/explore-bunjs-the-all-in-one-javascript-runtime.html\">Bun.js JavaScript runtime<\/a> as an alternative to Node.js. Bun&#8217;s creator Jarred Sumner told me &#8220;Zig is sort of similar to writing C, but with better memory safety features in debug mode and modern features like defer (sort of similar to Go&#8217;s) and arbitrary code can be executed at compile-time via <em>comptime<\/em>. It has very few keywords so it&#8217;s a lot easier to learn than C++ or Rust.&#8221;<\/p>\n<p>Zig differs from most other languages in its small feature footprint, which is the outcome of an explicit design goal: <em>Only one obvious way to do things<\/em>. Zig&#8217;s developers take this goal so much to heart that for a time, <a href=\"https:\/\/github.com\/ziglang\/zig\/issues\/8292\">Zig had no for loop<\/a>, which was deemed an unnecessary syntactic elaboration upon the already adequate while loop. Kevin Lynagh, coming from a Rust background, <a href=\"https:\/\/kevinlynagh.com\/rust-zig\/\">wrote<\/a>, &#8220;The language is so small and consistent that after a few hours of study I was able to load enough of it into my head to just do my work.&#8221; Nathan Craddock, a C developer, <a href=\"https:\/\/nathancraddock.com\/blog\/2022\/consistency-in-zigs-type-system\/\">echoed the sentiment<\/a>. Programmers seem to really like the focused quality of Zig&#8217;s syntax.<\/i><br \/>\nWhile Zig is &#8220;<a href=\"https:\/\/www.reddit.com\/r\/Zig\/comments\/ty1z6e\/when_will_zig_be_ready_for_production_use\/\">approaching<\/a>&#8221; production-ready status, the article notes its high degree of interoperability with C and C++, its unique error-handling system, and its elimination of a <em>malloc<\/em> keyword (leaving memory allocation to the standard library).<\/p>\n<p>&#8220;For now, the Zig team appears to be taking its time with the 1.0 release, which may <a href=\"https:\/\/www.reddit.com\/r\/Zig\/comments\/x6ibug\/any_available_official_timeline_for_when_v10_is\/\">drop in 2025 or later<\/a> \u2014 but none of that stops us from building all sorts of things with the language today.&#8221;<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p class=\"excerpt\">These days I was just wondering if anyone has compiled a list of &#8220;Modern C replacement&#8221; languages when Slashdot almost read my mind: Meet Zig: the Modern Alternative to the C Programming Language &#8211; Slashdot<\/p>\n<p class=\"more-link-p\"><a class=\"more-link\" href=\"https:\/\/monodes.com\/predaelli\/2023\/03\/12\/modern-c-replacements\/\">Read more &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[1],"tags":[],"class_list":["post-10303","post","type-post","status-publish","format-standard","hentry","category-senza-categoria"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p6daft-2Gb","jetpack-related-posts":[{"id":8158,"url":"https:\/\/monodes.com\/predaelli\/2021\/02\/07\/the-v-programming-language\/","url_meta":{"origin":10303,"position":0},"title":"The V Programming Language","author":"Paolo Redaelli","date":"2021-02-07","format":false,"excerpt":"I've just read \"Is Zig the long awaited C replacement\" and it cites: The V Programming Language seems to be a \"fastly compiling\" language. Compilation speed benchmark C 5.2s gcc test.c C++ 1m 25s g++ test.cpp Zig 10.1s zig build-exe test.zig Nim 45s nim c test.nim Rust Stopped after 30\u2026","rel":"","context":"In &quot;Comparisons&quot;","block_context":{"text":"Comparisons","link":"https:\/\/monodes.com\/predaelli\/category\/comparisons\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":8181,"url":"https:\/\/monodes.com\/predaelli\/2023\/03\/12\/replacing-c\/","url_meta":{"origin":10303,"position":1},"title":"Replacing C","author":"Paolo Redaelli","date":"2023-03-12","format":false,"excerpt":"Do We Need a Replacement for C? I found this old draft that cites Zig programming language... time to undraft it... :) C is a widely used language used to program anything from OS kernels to cryptography libraries. Is it time for a replacement? Erik EngheimNov 25, 2020\u00b75 min read\u2026","rel":"","context":"In &quot;Senza categoria&quot;","block_context":{"text":"Senza categoria","link":"https:\/\/monodes.com\/predaelli\/category\/senza-categoria\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":5473,"url":"https:\/\/monodes.com\/predaelli\/2019\/04\/09\/most-popular-programming-languages-c-knocks-python-out-of-top-three-in-new-study-slashdot\/","url_meta":{"origin":10303,"position":2},"title":"Most Popular Programming Languages: C++ Knocks Python Out of Top Three in New Study &#8211; Slashdot","author":"Paolo Redaelli","date":"2019-04-09","format":"link","excerpt":"Is it time to give C++ a second canche or to revive mi interest for Eiffel? Source: Most Popular Programming Languages: C++ Knocks Python Out of Top Three in New Study - Slashdot C++ has knocked machine-learning favorite Python out of the top 3 in the TIOBE Index of popular\u2026","rel":"","context":"In &quot;Mood&quot;","block_context":{"text":"Mood","link":"https:\/\/monodes.com\/predaelli\/category\/mood\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":14846,"url":"https:\/\/monodes.com\/predaelli\/2026\/01\/28\/flutter-a-necessary-evil\/","url_meta":{"origin":10303,"position":3},"title":"Flutter? A necessary evil","author":"Paolo Redaelli","date":"2026-01-28","format":false,"excerpt":"Flutter SDK is available only for Linux x64. MacOS has ARM and x64 packages, Windows has x64. This make developing on Raspberry a real chore, not to speak *BSD. This makes me distrust the language as it seems a little to much under the whims of the GAFAM that controls\u2026","rel":"","context":"In &quot;Ethics&quot;","block_context":{"text":"Ethics","link":"https:\/\/monodes.com\/predaelli\/category\/ethics\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2025\/12\/flet-dev.webp?fit=752%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2025\/12\/flet-dev.webp?fit=752%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2025\/12\/flet-dev.webp?fit=752%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2025\/12\/flet-dev.webp?fit=752%2C800&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":9943,"url":"https:\/\/monodes.com\/predaelli\/2022\/12\/23\/why-modern-alternative-languages-never-replace-c-c\/","url_meta":{"origin":10303,"position":4},"title":"Why Modern Alternative Languages Never Replace C\/C++","author":"Paolo Redaelli","date":"2022-12-23","format":false,"excerpt":"I must correct Shalitha Suranga because while he correctly titled his article Why Modern Alternative Languages Never Replace C\/C++ Hundreds of C\/C++ alternatives will come, but C\/C++ will be with us forever! He wrote all the reason why C will remain forever as a \"portable assembler\". C++ is a complex\u2026","rel":"","context":"In &quot;Software&quot;","block_context":{"text":"Software","link":"https:\/\/monodes.com\/predaelli\/category\/software\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1286,"url":"https:\/\/monodes.com\/predaelli\/2016\/04\/17\/eiffel-a-viable-candidate-as-a-language-for-the-gnome-platform\/","url_meta":{"origin":10303,"position":5},"title":"Eiffel: A viable candidate as a language for the Gnome platform ?","author":"Paolo Redaelli","date":"2016-04-17","format":false,"excerpt":"Eiffel: A viable candidate as a language for the Gnome platform ? It was 2004. Linux were labelled as a cancer by Ballmer, Android and iPhone didn't existed. Multi-core CPU were still high-end. It was a different world. From archive.org, before it got lost.... Twelve years ago. And it was\u2026","rel":"","context":"In &quot;Eiffel&quot;","block_context":{"text":"Eiffel","link":"https:\/\/monodes.com\/predaelli\/category\/eiffel\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts\/10303","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/comments?post=10303"}],"version-history":[{"count":0,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts\/10303\/revisions"}],"wp:attachment":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/media?parent=10303"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/categories?post=10303"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/tags?post=10303"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}