This week's book giveaways are in the Jython/Python and Object-Oriented programming forums. We're giving away four copies each of Machine Learning for Business: Using Amazon SageMaker and Jupyter and Object Design Style Guide and have the authors on-line! See this thread and this one for details.
I'm taking a look at the Go Language Spec on "https://golang.org/ref/spec#Pointer_types" where it says, "The notation ... specifies an array length equal to the maximum element index plus one." Then, as an example, it lists:
This has got me completely confused. What exactly does the bracket ellipsis bracket mean? Can anybody explain this to me?
BTW, the ... operator is not an "ellipsis" just as the Receive operator, <-, is not a left arrow. An ellipsis is a single character, '…', whereas the ... operator is made up of three consecutive '.' characters. I can't find any reference that gives a formal name to this operator and it appears to have at least three meanings, depending on the context in which it is used. With array declarations as we have discussed here, it causes the compiler to count the number of elements in an array literal to automatically determine the size of the array to allocate. In a formal parameter list, it indicates a variadic parameter of a function that can take a variable number of arguments. As part of a function call argument, it expands a slice or array so that each element is a separate value that is passed to a variadic parameter.
The best ideas are the crazy ones. If you have a crazy idea and it works, it's really valuable.—Kent Beck