Question - Why invent a language syntax instead of building a powerful tool that leverages an existing language? #18
-
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
There are generally three reasons.
I guess I'll wrap this up with the following: Command CAD has been a very selfish project. I made it entirely for myself. I doubt I'd ever get sponsors and I don't really need sponsors, so I'm making it exactly what I want a CAD program to be. I wanted a fully declarative CAD with unit literals, dimensional type safety, and imperative modeling. I made it open source in hopes that if other people like it, they'd contribute back into it to improve the feature set. If that never happens, I don't care. I still got a CAD program that I like out of this. |
Beta Was this translation helpful? Give feedback.
There are generally three reasons.
I couldn't find a practical way to fit the unit typing to literals (that
10mmsyntax). I looked into Python, Lua, and Rhai. We could have just made units a new type for these languages, like saymeasurement.new(10, "mm"), but that just felt... clunky. The Rust library uom (from which I took a lot of inspiration) does something similar to this, and that's where I got to experience working with a system like that. I will admit that I did not research JavaScript or TypeScript.Scripting languages don't play well with threads. Typically you'll have some kind of global interpreter that has to be locked behind a Mutex (see Python's GIL). With Lua and Rhai …