News for hackers. Stuff that matters.
Re:Tell HN: C Experts Panel – Ask us anything about C by DougGwyn on Tuesday April 14, 2020 @10:38AM (#22866533)
Many uses of strchr do write via a pointer derived from a non-const declaration. When we introduced const qualifier it was noted that they were actually declaring read-only access, not unchangeability. The alternative was tried experimentally and the consequent "const poisoning" got in the way.
Re:Tell HN: C Experts Panel – Ask us anything about C by coliveira on Tuesday April 14, 2020 @12:26PM (#22867897)
I believe C is doing the right thing. Const as immutability is a kludge to force the language to operate at the level of data structure/API design, something that it cannot do properly.
Re:Tell HN: C Experts Panel – Ask us anything about C by moonchild on Tuesday April 14, 2020 @12:53PM (#22868295)
Have you ever used a high-level statically-typed language, e.g. haskell?