[OpenSCAD] Openscad Indirect Functions
adrianh.bsc at gmail.com
Sun Oct 16 12:33:38 EDT 2016
> Yes that would get my vote. Very simple and powerful while totally
> backwards compatible.
> The "a" example is confusing only because of the nested definitions
> hiding. Nothing to do with the separate namespaces. It is always obvious
> which of the three namespaces is referenced.
As nested definitions are possible then using a @"" syntax is not advisable
as this would not work in particular contexts:
Or worse, the wrong function could called.
Being able to reference any of the namespaces is only necessary when storing
a reference to it in a definition. (As does doug.moen, I prefer the use of
'definition' over 'variable' as it's value is not mutable.) So, it is only
necessary to use a decorator when referencing from one of the other
namespaces. Doug's suggestion is to use *m$* and *f$* prefixes to
explicitly reference them. He also stated using *v$* for the
variable/definition namespace, but, IMHO that wouldn't be useful, as this
namespace is used by default when assigning to a definition or passing as a
parameter. So the above example becomes like this:
View this message in context: http://forum.openscad.org/Convert-from-object-to-polygon-polyhedron-tp18522p18733.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
More information about the Discuss