Echoing a sibling comment. OpenSCAD is DEFINITION LANGUAGE and while it feels kindof like a programming language it's wildly not. Here's a comment in a (lengthy) issue that describes in more detail.
My main complaint was you can't say with OpenSCAD:
translate(makePen().cap) ; translate(makePen().body)
# ...to decompose/modify returned parts of complex objects
...and woefully, you cannot say:
pen := new Pen(q,r,s,t); box := new Box( pen.L, pen.W, pen.H )
# ...to be able to make boxes for arbitrary pens
...so it's MATHEMATICALLY parametric, not PROGRAMMABLY parametric, which led me down other CAD-language (eg: CadQuery), or you could use `*.scad` as a _rendering_ language rather than a _development_ language.
https://github.com/openscad/openscad/pull/4478#issuecomment-...
My main complaint was you can't say with OpenSCAD:
...and woefully, you cannot say: ...so it's MATHEMATICALLY parametric, not PROGRAMMABLY parametric, which led me down other CAD-language (eg: CadQuery), or you could use `*.scad` as a _rendering_ language rather than a _development_ language.