Earlier quoted context omitted.
Alexander Stepanov gave STL to ANSI C++ working group, after implementing it originally in Ada 83. What HP and SGI did was to provide the first C++ working implementations of it, outside the ANSI C++ working group work.
It would be nice if the STL would be a common denominator across a few languages.
The Development of the C Language
11–20 of 24 posts
Re: The Development of the C Language
#12On the other hand, C's treatment of arrays in general (not just strings) has unfortunate implications both for optimization and for future extensions. The prevalence of pointers in C programs, whether those declared explicitly or arising from arrays, means that optimizers must be cautious, and must use careful dataflow techniques to achieve good results. Sophisticated compilers can understand what most pointers can p…
memmove versus memcpy only solves the problem for block moves, not for other array operations. Think about a Fast Fourier Transform or whatever where the compiler has to suspect that the inputs overlap in dumb ways.
Re: The Development of the C Language
#13For example I always assumed C came from a strong typing background and its premises was always about being portable. Neither of them are true.
Re: The Development of the C Language
#14On the other hand, C's treatment of arrays in general (not just strings) has unfortunate implications both for optimization and for future extensions. The prevalence of pointers in C programs, whether those declared explicitly or arising from arrays, means that optimizers must be cautious, and must use careful dataflow techniques to achieve good results. Sophisticated compilers can understand what most pointers can p…
Rust has this concept baked into the language: any mutable reference is statically guaranteed to not alias anything else that is accessible. Non-mutable references can alias each other, but I don't think there are any optimizations that could be inhibited by this.
Re: The Development of the C Language
#15Therefore, just like with assembly, there is nothing too "unfortunate" about the language's design (including its "treatment of arrays"), and the fact that C has been, and still remains, highly popular is just the result of healthy competition, IMO.
There are a few little things that I wish were different (for example, I see the arrow symbol '->' as noisy and unnecessary - the simple period '.' would work with pointers just as well; also, the "semicolon cancer"...), but the language seems to be pretty usable the way it is.
Re: The Development of the C Language
#16Earlier quoted context omitted.
> I also think the STL is the beautiful thing C++ gave us, [...] It did not. STL was given to us by HP and SGI, and then C++ adopted STL into its standard library.
Alexander Stepanov gave STL to ANSI C++ working group, after implementing it originally in Ada 83. What HP and SGI did was to provide the first C++ working implementations of it, outside the ANSI C++ working group work.
And, if I understand correctly, Stroustrup saw the STL and said (paraphrased) "Yeah, that's going in."
Re: The Development of the C Language
#17Earlier quoted context omitted.
Yet it took up all these years until clang for anyone to start taking static analysis seriously in C In some circles maybe, but some industries have decades of experience applying static analysers to their C code, and companies have been selling static analysers throughout.
Outside industries where MISRA-C is part of the daily vocabulary, I never seen any appreciation for C static analysers.
Re: The Development of the C Language
#18I love stories like this. All the history behind a very young but rich science. For example I always assumed C came from a strong typing background and its premises was always about being portable. Neither of them are true.
C is notoriously weakly typed. There are lots of implicit casts that will automatically be applied. And (void *) is your door to freedom from types (this can be a good thing in some cases, of course.)
Re: The Development of the C Language
#19I love stories like this. All the history behind a very young but rich science. For example I always assumed C came from a strong typing background and its premises was always about being portable. Neither of them are true.
Re: The Development of the C Language
#20On the other hand, C's treatment of arrays in general (not just strings) has unfortunate implications both for optimization and for future extensions. The prevalence of pointers in C programs, whether those declared explicitly or arising from arrays, means that optimizers must be cautious, and must use careful dataflow techniques to achieve good results. Sophisticated compilers can understand what most pointers can p…
> I also think the STL is the beautiful thing C++ gave us, [...] It did not. STL was given to us by HP and SGI, and then C++ adopted STL into its standard library.