The first one is a type conversion, not the second.
On Thu, Aug 17, 2017, 14:59 Soumya Mukherjee wrote:
> Thank you both. I did not realize the latter syntax is that of a type
> conversion.
>
> On Thursday, August 17, 2017 at 1:43:45 PM UTC-4, Axel Wagner wrote:
>>
>>
>>
>> On Thu, Aug 17, 2017
Thank you both. I did not realize the latter syntax is that of a type
conversion.
On Thursday, August 17, 2017 at 1:43:45 PM UTC-4, Axel Wagner wrote:
>
>
>
> On Thu, Aug 17, 2017 at 6:09 PM, Soumya Mukherjee > wrote:
>
>> I am new to Golang. What is/are the difference(s) between the following
On Thu, Aug 17, 2017 at 6:09 PM, Soumya Mukherjee
wrote:
> I am new to Golang. What is/are the difference(s) between the following
> declarations?
>
> []T(nil)
>
> and
>
> []T {}
>
> Both seem to work identically for me.
>
https://play.golang.org/p/g6EFru8hUU
Literally the only difference.
> A
On Thu, Aug 17, 2017 at 6:46 PM Soumya Mukherjee
wrote:
> What is/are the difference(s) between the following declarations?
No declarations, both are expressions.
> []T(nil)
Type conversion.
> []T {}
Compound literal.
> Both seem to work identically for me.
They're not the same: https://pl