←back to thread

71 points susam | 9 comments | | HN request time: 1.111s | source | bottom
1. EVa5I7bHFq9mnYK ◴[] No.43674213[source]
Some of his grievances:

Lack of external static storage class, the pinnacle of C programming.

Lack of oh so powerful C strings, terminating in zero (hopefully).

"There is no way to override the type mechanism when necessary, nothing analogous to the "cast" mechanism in C."

"begin" and "end" are bulky compared to { and }.

replies(3): >>43674293 #>>43675646 #>>43675815 #
2. cjfd ◴[] No.43674293[source]
This is not a very accurate summary of said article. In fact it is inaccurate enough to call it lying.
replies(1): >>43674346 #
3. EVa5I7bHFq9mnYK ◴[] No.43674346[source]
That's not a summary. That's a number of quotes demonstrating Mr. Kernighan's judgements about PL virtues that didn't stand the test of time.
replies(2): >>43674536 #>>43674660 #
4. nmz ◴[] No.43674536{3}[source]
BEGIN and END are still bulky, Even C got it wrong by making () mandatory instead of {}, which is something go fixed.
5. Arainach ◴[] No.43674660{3}[source]
It's a significantly incomplete list - and absolutely not a list of "quotes" as none of the items in your list appear in the article:

>Lack of external static storage class, the pinnacle of C programming.

>Lack of oh so powerful C strings, terminating in zero (hopefully).

>"There is no way to override the type mechanism when necessary, nothing analogous to the "cast" mechanism in C."

>"begin" and "end" are bulky compared to { and }.

In my opinion these are some of the less significant arguments. Your post never stated that it contains merely a subset a subset and instead claims to refute or weaken the overall proposal. I agree with the previous poster that this is a form of lying.

For instance, you ignored one of the very first and most significant points, "The size of an array is part of its type" which means that " it makes it difficult indeed to create a library of routines for doing common, general-purpose operations like sorting"

Incidentally, those are examples of quotes i.e. verbatim excerpts from the article.

replies(1): >>43674755 #
6. froh ◴[] No.43674755{4}[source]
then maybe amend your comment and start with "some of his grievances"?
7. citrin_ru ◴[] No.43675646[source]
Null-terminated strings is an endless source of bugs in C progras. I with C used fixed size strings (may be with varint instead of 8-bit length field) or Pascal got more tratcion.
replies(1): >>43675844 #
8. tliltocatl ◴[] No.43675815[source]
One that you are missing (and a pretty painful one, for that matter) is "lack of flexible array parameters".

Also, the problem with pascal string was the length being limited to 255 characters, which wasn't enough even at the time.

9. ziml77 ◴[] No.43675844[source]
And very annoyingly they can't be sliced except if you are only trimming off the front. If you need to chop off anything at the end, you either need to make a copy or do an icky and not thread safe hack of swapping out a character for the null character and then swapping it back when you're done.