Hacker News

Favorites Setup
Comment by jacquesm | original | OpenSCAD the Programmers Solid 3D CAD Modeller
[−]jacquesm · 2026-10-10 Sat 21:42 UTC · link
Well, you could be forgiven to think that if you wrote i=5; some code and then i=12; that 'some code' is executing with i set to 5. Instead all code is run with i=12 because there is only one value for a variable per scope.

This can lead to extremely annoying bugs because your brain is wired to read and understand this stuff sequentially rather than all at once. I've stared at some page of OpenSCAD code for a long time before realizing that it was yet another one of those footguns.

[−]CamperBob2 · 2026-10-10 Sat 22:29 UTC · link
So it's not the C of CAD, it's the Verilog of CAD. Got it.
[−]jacquesm · 2026-10-11 Sun 00:53 UTC · link
That's a good analogy. The annoying part is that it looks like C, but it really isn't.