Hacker Newsnew | past | comments | ask | show | jobs | submit | veltas's commentslogin

For anyone interested in this debate about working in 'secrecy' vs 'out in the open', this is the subject of the 1997 essay (and later book) "The Cathedral and the Bazaar" by Eric S. Raymond, comparing the classic free software development models vs the model used by the Linux kernel.

There's no 'instead', you can remember them both.

We can do a lot of things. Must we? Should we?

Burning resources to memorialize the past we only see through rose colored glasses of naive youth is vanity.

Biology is self selecting and that's all that's happening here. There's no intention or future value. It's plain old signal attenuation and entropy going on; memory is fading as those who experienced it churn out of existence.

A species still escaping banal worship of history ends up avoiding progress.


> Note how gcc is smart enough to detect that the expression ((0xc<<12) | 0xafe) is constant, so it can skip shifts and bitwise assembly operations and just emit the resulting immediate value at line 14. The same goes for the loop condition, gcc emits constant 1280 at line 10 in place of the multiplication 40x32. A classic compiler optimization called constant folding, but nice nonetheless.

This is actually required rather than an optimisation for any C compiler, from early on, as C semantically allows constant expressions rather than just constants to be used for statically allocated sizes, etc. While the 'optimisation' is not guaranteed you'll see even on -O0 the constant was evaluated at compile-time, as it's harder to not fold constant expressions sometimes than it is to just always fold them for the already required constant expression features.


If you don't like him don't go to his talk.

Should be called "Introduction to Functional Programming Languages"

The order is which things are covered is pretty standard for programming languages. Chapters 11 and 12 cover mutation. PLAI (https://www.plai.org/) covers similar material in a similar order.

I feel the same way about C/C++ having default return of 0 in main() only.


I really hated that change when I came out. I'm still not a big fan, but I made my peace with it understand that it benefits the poor users who have to deal with programs whose termination statuses are pseudo-random. Especially users doing scripting.

I write "return 0" at the end of main in all my programs if that end is reachable.


I write "return EXIT_SUCCESS;" maybe that constant might change... :-)


0 is guaranteed to mean 'success', although not guaranteed that it's equal to EXIT_SUCCESS, so you can always use 0.


I agree, this is the whole point of "Hello world", which is to show the boilerplate required to start a program capable of outputting text, as well as the actual code that outputs that text. It's also the chance to get the build tools setup, people forget that some of the 'boilerplate' is the actions required to build, which often are much more involved for newer tools and frameworks.

You can just say initially e.g. when I learned C++ that "#include <iostream>" can be "mostly ignored for now, but just know iostream stands for Input / Output stream, and this line is necessary to e.g. output with std::cout"; and there are no scars left from this.


Some scars... as cout << was always a bad idea, and taught people early on in their C++ development that being overly clever with operator overloading was expected


Which I think most people understood not to do themselves when they encountered their first issue with the precedence of << vs other operators in expressions they wanted to print.


I agree with the article on the basis it's easier to not bother trying to use a convention of plural names as there's a lot of time-wasting edge cases, and generally it's less weird seeing no plural than seeing a plural in the middle of an expression where it doesn't work.


Truly I agree, but if we can add features to improve C codebases without rewriting them then that's a win, and you can just ignore them if you don't like them (as I will), but to the people where this has benefit they can be used.


You can do f(int n, int (*a)[n]) and it does what it looks like, since C99.

https://godbolt.org/z/8dfKMrGqv


That's an entirely different thing (VLAs)


There's no VLA in my example.


Your example doesn't do any bounds checks, it just lets you get the sizeof. And the reason the sizeof works is the VLA infrastructure (which is not supported by MSVC so it won't compile the code).

What I want is -fbounds-safety from clang.


it does do bounds checks if you -fsanitize=bounds, in gcc at least

(and msvc is stuck on partial c11 support to this day, so imo, i don't quite think it's a fair target when comparing things to new features anyway)


Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: