On Mon, 15 Jun 2015 17:07:55 +0000, jmh530 wrote:

> I have a little bit of a follow up.
> 
> After making the recommended changes, the function seems to work with
> both static and dynamic arrays. I then noticed that all of the examples
> for functions that pass arrays in http://dlang.org/function.html use the
> dynamic array notation like my function above. Does this matter?

it doesn't, but i'd use `[]` anyway for code readability. static arrays 
can be converted to slices by the compiler when it needs to, but by using 
explicit `[]` it's easy to see if function expects slice or "real static 
array" right in the call site, without looking at function signature.

Attachment: signature.asc
Description: PGP signature

Reply via email to