On Thu, Aug 17, 2017 at 6:46 PM Soumya Mukherjee <kokhonom...@gmail.com>
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://play.golang.org/p/i5ukFA-w94

-- 

-j

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to