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
141
u/pheristhoilynenysis Jan 24 '26 edited Jan 24 '26
Probably because their use cases are too niche to be built into most of the languages. The fact that a feature is nice to have doesn't mean that it should be there. That's exactly what we have libraries for - you choose what you want to use. Remember that each feature for language is another component for language author to maintain which might be relatively high cost in comparison to gains. Edit: typos