[OpenSCAD] Openscad Indirect Functions

Kuba Marek blue.cube at seznam.cz
Mon Oct 17 03:19:02 EDT 2016

Or another option (fairly usable):
What about keeping separate function namespace for backwards
compatibility and introducing JavaScript-ish lambdas that exist in
variable namespace?

Usage example:

f = function(a, b) a + b;

instead of 

function f(a, b) = a + b;

This should be easy to parse, make functions behave in a familiar way
for people coming from other languages and add lambdas as a bonus.


> Good point.
> What about ".", as in f.func? It's not as standard and it kind of
> shuts the door on aggregate types.
> Apostrophe?  f'func? It kind of disappears between those two f's.
> Tilde? f~func? Looks like a minus sign.
> Caret? f^func?
> The more I think about this, the more I feel it's all going to
> descend into Perl-style babble.
> How about: function func
> function and module are already recognised symbols and are not
> syntactically allowed in this context. It's more typing, but its
> meaning is absolutely clear.
> --
> View this message in context:
> http://forum.openscad.org/Convert-from-object-to-polygon-polyhedron-tp18522p18742.html
> Sent from the OpenSCAD mailing list archive at Nabble.com.
> _______________________________________________
> OpenSCAD mailing list
> Discuss at lists.openscad.org
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

More information about the Discuss mailing list