I see debate again about whether openSCAD can be a proper programming
language without assignment The thing is that openSCAD is a functional
language like many others. I also use XQuery to develop entire web
applications and it too is functional.
For the past month I've been working on code to implement the Conway
polyhedra operators in openSCAD. There are implementations in JavaScript
and Python but not AFAIK in openSCAD or in a functional language.
The script is on Github
https://github.com/KitWallace/openscad/blob/master/conway.scad and now
implements all but one of the operators (cant get my head around whirl!)
with some additions such as a shell operation. The script enables complex
polyhedra to be constructed entirely in 'user-space' (is that the right
term?) as points and faces until turned into a solid via polyhedron(). The
code could do with some re-factoring but I think it is a good example of the
power of openSCAD and functional languages in general.
Development has been greatly eased by recent enhancements, particularly list
comprehensions and let(), and by my realization that search() facilitates
associative arrays. Aside from a few functions summing values in an array
where reduce() would avoid the need for recursion, I never missed
assignment. Programming in a functional language does however need a
different mindset which takes time to acquire.
OpenSCAD as a language has made huge advances since I started using it a
couple of years ago and my thanks go out to the team for a great project. Of
course, function parameters are top of my list for further work to make
openSCAD more fully functional.
Chris
--
View this message in context: http://forum.openscad.org/openSCAD-as-a-programming-language-testamonial-tp11590.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
OpenSCAD as a language has made huge advances since I started using it a
couple of years ago and my thanks go out to the team for a great project.
+1
Unless specifically shown otherwise above, my contribution is in the Public Domain; To the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. This work is published globally via the internet. :) Inclusion of works of previous authors is not included in the above.
View this message in context: http://forum.openscad.org/openSCAD-as-a-programming-language-testamonial-tp11590p11771.html
Sent from the OpenSCAD mailing list archive at Nabble.com.