discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

PythonSCAD rocks!

MK
Marius Kintel
Thu, May 15, 2025 12:43 AM

On May 14, 2025, at 14:45, Guenther Sohler via Discuss discuss@lists.openscad.org wrote:

Marius, I actually have already a branch with javascript and I am happy to push it further.
However, there is also one big disadvantage to consider:
Javascript does not support named parameters like openscad and python do.
Instead, function calls have only default parameters at most  which limits
the  option , how primitive calls can be expressed.

I do have experience with JavaScript embedding in C++ apps :)
Establishing a function/module call paradigm will be important. In JS, it’s also common to use config objects rather than unnamed parameters for such things.

I don’t have time to pursue this until after next release, so I’ll let this sleep for the time being.

-Marius

> On May 14, 2025, at 14:45, Guenther Sohler via Discuss <discuss@lists.openscad.org> wrote: > > Marius, I actually have already a branch with javascript and I am happy to push it further. > However, there is also one big disadvantage to consider: > Javascript does not support named parameters like openscad and python do. > Instead, function calls have only default parameters at most which limits > the option , how primitive calls can be expressed. > I do have experience with JavaScript embedding in C++ apps :) Establishing a function/module call paradigm will be important. In JS, it’s also common to use config objects rather than unnamed parameters for such things. I don’t have time to pursue this until after next release, so I’ll let this sleep for the time being. -Marius