" < > " means nested in, but why start with <1>, not <0>?


#1

I have a very small experience in programming and was trying to understand the code blocks here.
In one of the first examples, there is a replication of <1> to <2>. As I understood it identifies the nested arrays. But shouldn’t it be <0> to <1>?
Sorry for this basic question but as in programming every list starts with number 0, I wanted to ask.


#2


#3

This excerpt is from Dynamo Language Manual:

The Dynamo language was created as a domain-specific tool for
architects, designers and engineers, and as such has several
language features specifically tailored for these disciplines. A
common element in these disciplines is the prevalence of objects
arrayed repetitive grids, from brick walls and tile floors to façade
paneling and column grids. While range expressions offer a
convenient means of generating one dimensional collections of
elements, replication guides offer a convenient means of
generating two and three dimensional collections.

Replication guides take two or three one-dimensional collections,
and pair the elements together to generate one, two- or threedimensional
collection.

Replications are supposed to work in 3 dimensional space, and you need at least one dimension to create a collection (That’s the reason they start at 1 - *it appears you can give the dimension index of 0) There is zero-dimensional space topology but it’s useless for building design.
In nested arrays you put “one dimension inside another and then another one” (X array into Y array and those two into third Z array). This creates unnecessary dependencies. Replications solve this creating one collection of elements that treats all dimensions equally.

In short - they are not nested arrays.


#4

I don’t think it’s values of the replication guides that count, but the order. All of these yields the same result:

For more info, read this on Dynamos github wiki;


#5

yep- the numbers are meaningless except for their relative size.


#6

here is the relevant quote from Yu Ke from the above linked document.

“The numeric values for replication guides do not necessarily start from 1, negative values could even be used. “Replication guide values” in step 2 means those unique replication guide values after sorting. For example, for function call


#7

Yes, I read that too, but that’s not completely true, apparently:
image