You probably want to use interfaces. You can do a lot of “seemingly dynamic” 
programming with interfaces.

There are statically typed languages that pretty dynamic - Java with reflection 
and proxies - but Go is also statically compiled which makes the options 
limited - which is usually a good thing (e.g. over the dynamic unmaintainable 
mess that is Python).

> On Apr 12, 2020, at 12:12 PM, Tanmay Das <tanmaymi...@gmail.com> wrote:
> 
> Hi Jake,
> Thanks for the wishes. BTW, this is not my first statically typed language, I 
> know a little bit of C and Java. I was under the impression that Go is 
> capable of some dynamic behavior. Maybe things like Go's type inference, duck 
> typing, empty interface{} led me to believe that. All these type-related 
> bindings can be resolved at compile-time. So I was thinking, if the compiler 
> can do some extra work for resolving the types, maybe it could add a few more 
> steps to keep track of which function to call when an undefined method is 
> accessed. 
> 
> -- 
> 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.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/golang-nuts/271f39fa-bc9d-4a09-8773-09aee010d71a%40googlegroups.com.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/3678BC3E-B151-46A9-BEBD-1395D778EC6B%40ix.netcom.com.

Reply via email to