RSSAmplifier

I'm Gilmar Soares · Oct 10, 2024

Duck Typing in Go

0
Sign in to vote or save

This page cannot be shown here. You can still read it on the original site — the toolbar below keeps your place in the directory.

Hello everyone! As I mentioned in a previous post, I’m currently learning Go to use in some of my work projects. In this short post, I’ll explain how to use duck typing in Go, which was quite challenging for me when I first started learning the language. To begin, let’s look at a simple example in Python: class Duck : def quack ( self ): print ( 'Quack, quack!' ) class Person ( Duck ): pass def…

Read on /posts/duck-typing-in-go/

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.