On Thu, Nov 29, 2018 at 3:07 PM Robert Engels <reng...@ix.netcom.com> wrote:

> Wait, you support type inference and not dot imports... I think you
should revisit this opinion...

I believe it's the other way around. Seeing T alone has n bits of
information. Seeing foo.T carries more bits of information. So Seeing

x := foo.T{}

for example, tells me about everything what I need to know when I already
know what is and why I or anyone else imported package foo.

OTOH, "naked" T from an imported package loses that information and
requires to additionally build a mind map from T to foo. That's arguably
not simpler.

> also, dot imports are very versatile when changing the implementation
without changing a lot of LOC.

Well, then I hope your code reviewer does not share my opinions about dot
imports ;-)

BTW: Neither are dot imports allowed inside the Go project itself. IINM,
the only exception are tests that were written before the build system (the
go command) existed.


-- 

-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