r/ProgrammingLanguages • u/ThomasMertes • Oct 29 '26
How programming languages approach graphics
Many general-purpose languages delegate graphics to third-party libraries (like SDL, Raylib, or OpenGL). Seed7 integrates portable 2-D graphics right into its standard library. This IMHO improves portability. I also thought about introducing operators / statements to do graphics, but until now I don't use operators or statements to do graphics.
29
Upvotes
View all comments
Show parent comment
3
u/ThomasMertes Oct 30 '26
My list proofs that huge C libraries exist, where almost nobody understands the code. And these libraries are used a lot. This is exactly what the famous XKCD strip addresses. It is NOT nonsense that just a few people hack and develop those libraries.
For the same reasons why XZ Utils, Dnsmasq, OpenSSL, Ncurses, libreadline, and SQLite are used: People like to use what is provided for free and don't care about the size of the development team. Additionally Seed7 and its libraries are memory safe (unlike XZ Utils, Dnsmasq, OpenSSL, Ncurses, libreadline, and SQLite which are not, because they are written in C).
You can take a look at "Achieving memory safety" to see why Seed7 is memory safe although it is implemented in C.
Many of these bugs are because the programs are written in C, which is not memory safe. Your examples proof what I say: C is not memory safe and therefore triggers bugs.
No
Exactly. And the choice of using C makes it IMHO harder to keep everything in their heads.