r/ProgrammingLanguages • u/Luroqa • Jan 24 '26
Discussion Why don't any programming languages have vec3, mat4 or quaternions built in?
Shader languages always do, and they are just heaven to work with. And tasty tasty swizzles, vector.xz = color.rb it's just lovely. Not needing any libraries or operator overloading you know? Are there any big reasons?
110
Upvotes
View all comments
Show parent comment
1
u/arthurno1 Jan 26 '26
That is exactly the case because game dev is a niche. A chemist would want their own types, and a mechanical engineer would want their own types, and a natural language researcher would want theirs, and everyone would want their own types. Guess what? Sometimes, these types would collide with each other and be similar but slightly different. Whom will you cater?
The answer is exactly: none. You give them tooling so they can introduce they own types as they need them. This talk is by the one of the most famous language designers or our time and deals exactly with these questions. Highly suggested.