"Languages with methods typically fall into one of two camps: prepare
tables for all the method calls statically (as in C++ and Java), or do
a method lookup at each call (as in Smalltalk and its many imitators,
JavaScript and Python included) and add fancy caching to make that
call efficient. Go sits halfway between the two: it has method tables
but computes them at run time. I don't know whether Go is the first
language to use this technique, but it's certainly not a common one.
(I'd be interested to hear about earlier examples; leave a comment
below.)"
What means "it has method tables but computes them at run time."?
If I understand clearly:
- method names are checked (ie. "static duck typing") on compilation (static)
- but not the content of methods (dynamic)
Right?
[1] http://research.swtch.com/interfaces
--
Sebastien Douche <[email protected]>
Twitter: @sdouche / G+: +sdouche
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.