3 ms·
I'm pretty sure it's Turing complete by now. If it was conceptualized as a limited language and only became a full fledged programming language over time, it wo
by adius 2mo ago
I'm pretty sure it's Turing complete by now. If it was conceptualized as a limited language and only became a full fledged programming language over time, it would certainly explain all its weird warts. (Here is some more details: https://github.com/ad-si/LuaCAD#why-lua https://github.com/ad-si/LuaCAD#why-lua) I guess 3D modeling is just too complex for a simple, but limited DSL.
Lua is easier to use, faster, and more feature-rich. It's one of those rare occasions when a new solution is actually better in every single way.
- adastra22 2mo agoIn the pedantic sense, yes. You can use recursive functions with tail-call optimization, or list comprehensions to emulate a universal Turing machine. But my point is that OpenSCAD's expression purity and one-way compilation model are purposefully limited, and not historical accident: models are a deterministic function of their parameters, subtrees can be cached and reused during preview without invalidation logic, designs diff and merge as text, etc. Sometimes making things "more programmable" is an anti-feature.
- cjbgkagh 2mo agoAFAIK OpenSCAD does not do any meaningful optimizations that are enabled by having a limited DSL, despite that normally being a good reason to do a DSL. And ironically you often have use a general purpose language (python and C++) to do custom optimizations not possible in the DSL.
- adastra22 2mo agoOpenSCAD is garbage and I'm not going to defend it. But I would prefer if a new CAD engine didn't regress.