[simple-linked-list] Add missing initialValues field#2645
Conversation
Templating languages that distinguish between undefined and empty list will crash out on this missing field, or force the template author to handle the field's absence explicitly.
ad8f8c9 to
490f9ea
Compare
|
This actually causes the Go generator to swap |
|
There are several other test cases with an empty Maybe off topic here, but I am curious why |
Yup. Though it's not a problem so much as not following accepted style.
Go encourages the "zero value" to be useable as is. You should be able to use the See https://google.github.io/styleguide/go/decisions#nil-slices and https://github.com/pthethanh/effective-go#declaring-empty-slices |
Templating languages that distinguish between undefined and empty list
will crash out on this missing field, or force the template author to
handle the field's absence explicitly.