[OpenSCAD] Clarifying behaviors
doug at moens.org
Sat Oct 1 17:56:36 EDT 2016
There is no language specification. The language manual is actually a wiki
that is edited by end users. Some parts of that documentation is based on
experiments to reverse engineer the specification (that's what I do a lot
of the time), other parts of the documentation are written by developers
when new features are added. Parts of the documentation are great, other
parts are bad and misleading. You can edit it yourself to clarify the
meaning of the + operator.
I have never seen the "broadcasting" addition before. Combining this
operator with the recursive nature of the addition of lists, may I expect
that [1, 1] + [[2, 3], [4, 5]] == [[3, 4], [5, 6]] ?
Yes, that's correct.
On 1 October 2016 at 17:05, Ronaldo <rcmpersiano at gmail.com> wrote:
> Thank you, doug, for your answer.
> Yes, that is also what I expect from the scalar product and sum of lists. I
> could not say, however, that this was my understanding unless I had read
> OpenSCAD code (what I am not able to do :( ). Without a language
> specification, the only source to solve this kind of doubts are the manual
> and you, the team is working hard for a fantastic open software. And the
> manual is sometimes incomplete or misleading. I have started a small
> contribution to the manual but in respect to some issues I need your
> I don't like the way the manual presents those operator. I don't like the
> name vectors for lists. It is misleading for the beginner that may think of
> a list of two or three numbers, the coordinates of a 2D or 3D vector. If
> understand [x, [y, z, [w]] ], where x, y, z, w are numbers, as an element
> a vector space, well, I agree that the addition of lists is an addition of
> vectors defined for vectors in the same vector space and undef otherwise.
> But how many OpenSCAD users have this understanding?
> When, by means of lots of tests, I realized that and saw how beautiful is
> the language and how misleading is this topic in the manual. And I use it
> my codes.
> So, if this behavior is part of the language specification, nice!, I would
> try to express it in a manual review. And I can trust in it and keep using
> I have never seen the "broadcasting" addition before. Combining this
> operator with the recursive nature of the addition of lists, may I expect
> that [1, 1] + [[2, 3], [4, 5]] == [[3, 4], [5, 6]] ?
> View this message in context: http://forum.openscad.org/
> Sent from the OpenSCAD mailing list archive at Nabble.com.
> OpenSCAD mailing list
> Discuss at lists.openscad.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Discuss