r/ProgrammingLanguages • • 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

81 comments sorted by

View all comments

Show parent comment

2

u/ThomasMertes Oct 30 '26

Yes but I asked you why do you have two terms, both "proc" and "func", not why you declare a return value. You have introduced an extra cognitive burden on your users, when "func", would be completely enough.

Yes, func would be completely enough and proc is just a shortcut for func void

proc is shorter, but nobody hinders you to forget about proc altogether and use func void everywhere instead.

Seed7 and its libraries define many types (see here). Currently the Seed7 manual lists 49 types and proc is just one of them. You don't need to know all these types when you start programming in Seed7. Beginners just need a few of them:

$ include "seed7_05.s7i";

const proc: main is func
  begin
    writeln("hello world");
  end func;

You see: At the beginning you don't need to know func. :-)

1

u/arthurno1 Oct 30 '26

proc is shorter, but nobody hinders you to forget about proc altogether and use func void everywhere instead.

You now what they say about design:

"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away."

-- Antoine de Saint-Exupéry in The Little Princ