Top all-time · #1331
Jens Gustedt
Personal blog · gustedt.wordpress.comprogramming
Jens Gustedt's personal blog at gustedt.wordpress.com covers programming. Since 2012, 52 different Hacker News readers have linked it 97 times, most often “A Defer Mechanism for C”. It is still writing: the last post was on 2026-02-15, and you can follow it by feed.
Too few sampled comments (26) to say how often HN recommends it.?
Why HN links it
HN readers cite Jens Gustedt's blog as a C standards reference, covering the defer proposal, _Generic, size_t and the Modern C book. Commenters link it as support for points about C language design.
- Recommended for · 6 comments
- Modern C called 'a solid book' and 'an opinionated but sane guide'; the _Generic post is worth reading; 'cool stuff'.
Summarised by Claude from a sample of 26 HN comments that link here. Each comment is marked recommending, critical or neutral (citing without judging); how this works.
programming in modern C
Most-linked posts?
- A Defer Mechanism for C4 people · 5 mentions · first linked 2020-12-14
- C2x: the next real revision of the C standard4 people · 4 mentions · first linked 2018-11-12
- Modern C is now feature complete4 people · 4 mentions · first linked 2016-11-28
- A defer feature using lambda expressions4 people · 4 mentions · first linked 2022-01-15
- Contracts for C3 people · 5 mentions · first linked 2025-03-10
- Don't use fake matrices (2014)3 people · 4 mentions · first linked 2020-09-12
- Don’t use casts3 people · 3 mentions · first linked 2014-04-18
- Feature Freeze in C233 people · 3 mentions · first linked 2021-10-16
- Checked integer arithmetic in the prospect of C233 people · 3 mentions · first linked 2022-12-18
- The new __VA_OPT__ feature in C232 people · 3 mentions · first linked 2023-08-08
What Hacker News says?
I follow regularly these people, these are mostly slow-going blogs or websites: 1. Fabrice Bellard: https://bellard.org/ This is not really a blog, but a traditional website with links to the work of its author (who is probably one of the top programmers ever). It updates rarely, but when it does, it is to expose yet another monumental piece of computing work that will blow your universe. 2. Linus Akesson: https://w…
Comment linking /
on “Ask HN: What are good solo developer blogs that you enjoy reading?”Submitted Modern C, Second Edition as a story · 597 points
HN discussionCool stuff! Typo in first paragraph of https://gustedt.wordpress.com/category/c/ (mayor instead of major)
Comment linking /category/c/
on “Modern C, Second Edition”Submitted The C23 edition of Modern C as a story · 515 points
HN discussionAside from K&R, you might want to look at the Modern C PDF https://gustedt.wordpress.com/2016/11/25/modern-c-is-now-fea... for an opinionated but sane guide. Also 21st Century C has been recommended, and it goes into tooling as well.
Comment linking /2016/11/25/modern-c-is-now-feature-complete/
on “Ask HN: What should a systems/low-level software engineer know?”Submitted The provenance memory model for C as a story · 225 points
HN discussionI’m actually implementing that right now for my own use, as a pre-processor. There is a much more advanced design and implementation at “A defer mechanism for C” (December 2020): https://gustedt.wordpress.com/2020/12/14/a-defer-mechanism-f... For my own purposes, I think I can live without handling stack unwinding so I continue working on my pre-processor. Since the pre-processor is not yet finished, there I use a v…
Comment linking /2020/12/14/a-defer-mechanism-for-c/
on “Beej’s Guide to C Programming [pdf]”Submitted A Defer Mechanism for C as a story · 187 points
HN discussionBeej's guides are the best way to get started quickly (i.e. in the time frame of a university course). For a more thorough introduction, one should probably read "Advanced Programming in the UNIX Environment" and "UNIX Network Programming", both from Richard Stevens. Jens Gustedt has also written a rather nice ebook on how to program in modern C: https://gustedt.wordpress.com/2016/11/25/modern-c-is-now-fea...
Comment linking /2016/11/25/modern-c-is-now-feature-complete/
on “Beej's Guide to C Programming (2007)”Submitted C: Simple Defer, Ready to Use as a story · 175 points
HN discussionAs Jens Gustedt points out[1], the following intentional unsigned overflow works perfectly for downwards iteration (even when length is 0 or SIZE_MAX), though it looks a bit confusing at first: for (size_t i = length - 1; i < length; i--) ... You are also free to start at any other (not necessarily in-bounds) index, just like with ascending iteration. [1] https://gustedt.wordpress.com/2013/07/15/a-praise-of-size_t-.…
Comment linking /2013/07/15/a-praise-of-size_t-and-other-unsigned-types/
on “Why do arrays start at 0?”Submitted C2x: the next real revision of the C standard as a story · 175 points
HN discussionThe author has also been involved in development of "musl", a modern C11 compliant standard library implementation: http://www.musl-libc.org https://gustedt.wordpress.com/2014/10/14/musl-1-1-5-with-ful...
Comment linking /2014/10/14/musl-1-1-5-with-full-c11-library-support/
on “Modern C [pdf]”Submitted Modern C is now feature complete as a story · 127 points
HN discussionYour wish might become reality soon https://gustedt.wordpress.com/2021/01/12/improve-type-generi...
Comment linking /2021/01/12/improve-type-generic-programming/
on “Mitigating Memory Safety Issues in Open Source Software”Submitted Contracts for C as a story · 108 points
HN discussionI based my comment on Jens Gustedt's article [1] about adding a "defer" mechanism in standard C. Clearly, the C committee works hard on improving the language and they are in the process to standardize important features, such as lambda functions, auto, typeof (like C++'s decltype more or less), and so forth. In my humble opinion, "defer" can mild the buffer / memory overflow, but of course not permanently remedied…
Comment linking /2020/12/14/a-defer-mechanism-for-c/
on “Mitigating Memory Safety Issues in Open Source Software”Submitted White space does matter in C23 as a story · 103 points
HN discussioncouple of weeks (days ?) back there was a post here which described the new defer mechanism (possible source of reference: https://gustedt.wordpress.com/2020/12/14/a-defer-mechanism-f... ) this can do that quite easily afaik.
Comment linking /2020/12/14/a-defer-mechanism-for-c/
on “Why Zig when there is already C++, D, and Rust?”Submitted Braiding the spaghetti: implementing defer in the preprocessor as a story · 41 points
HN discussion> two's complement For C2x and C++2x it looks likely that they will drop support for sign-magnitude and ones' complement representations of signed integers, essentially mandating two's complement. https://gustedt.wordpress.com/2018/11/12/c2x/ https://herbsutter.com/2018/11/13/trip-report-fall-iso-c-sta... http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p090...
Comment linking /2018/11/12/c2x/
on “C Portability Lessons from Weird Machines”Submitted Make C string literals const? as a story · 35 points
HN discussionHere is a post from 2014 from someone who is in the C standard committee. https://gustedt.wordpress.com/2014/09/08/dont-use-fake-matri...
Comment linking /2014/09/08/dont-use-fake-matrices/
on “C’s Biggest Mistake (2009)”Submitted Cross Language interfaces between C and C++ (2017) as a story · 32 points
HN discussionAccording to https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p23... , it's an "unadopted feature being explored." There's more information about the proposal at https://gustedt.wordpress.com/2022/01/15/a-defer-feature-usi...
Comment linking /2022/01/15/a-defer-feature-using-lambda-expressions/
on “C23: A Slightly Better C”Submitted Improve type generic programming as a story · 29 points
HN discussionAs for learning C, I like to recommend Modern C : https://gustedt.wordpress.com/2019/09/18/modern-c-second-edi... There are also printed versions.
Comment linking /2019/09/18/modern-c-second-edition/
on “A guide to getting started with embedded systems”Submitted Include __FILE__: Include recursion in C is possible and useful as a story · 20 points
HN discussionThe aliasing rule isn’t symmetric: you can access objects originally declared as types other than char using char pointers , but you can’t access objects originally declared as char using non-char pointers. (And malloc()ed buffers are neither of the above and have their own rule.) Here’s a blog post explaining it in more detail: https://gustedt.wordpress.com/2016/08/17/effective-types-and...
Comment linking /2016/08/17/effective-types-and-aliasing/
on “C2x: the next real revision of the C standard”Submitted C17: a “bugfix release” of the C standard as a story · 19 points
HN discussion