Comment

Comment by jforberg

It rarely makes sense. Pointer to const is a contact between caller and callee. A signature like char <star>strdup(const char <star>) says "I take a pointer to memory that I promise not to modify, and you get a pointer to memory that you may modify".

Const pointer is a statement about the internal variables of a function definition, usually not of any interest outside the function itself and therefore rarely used.

parent jforberg 7 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton