r/ProgrammingLanguages • u/ThomasMertes • 29d ago
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
4
u/TheRealUprightMan 29d ago
What kind of graphics are you trying to do? Drawing primitives? Why? Most applications only need UI primitives. Is it a game library that needs 3D transforms? Format conversions? Your question is overly broad.
Why would I want to learn some new language to convert a jpeg? I have plenty of tools that can do that without learning a new language. I also don't understand your question. Graphics are just manipulating bits and bytes, which any language should be able to do.
If you are against using C libraries, you are likely going to end up doing a lot of work. Your options are "use someone else's code" and "write it yourself". The latter option will be a huge undertaking and it will have more bugs than something that has been tested in the wild for a couple decades.