4129 links
740 private links
  • Doo's links
  • Home
  • Login
  • RSS Feed
  • ATOM Feed
  • Tag cloud
  • Picture wall
  • Daily
  • ► Jouer les vidéos
Links per page: 20 50 100
3 results tagged interfaces x
  • Golang interfaces, a pragmatic explanation for the programmer | iMil.net
    January 19, 2019 11:44:29 AM GMT+01:00 * - permalink -
    QRCode
    - https://imil.net/blog/2018/12/09/Golang-interfaces-a-pragmatic-explanation-for-the-programmer/
    golang interfaces
  • Interfaces in Python: Protocols and ABCs · Abu Ashraf Masnun

    la version python pour comparer

    December 10, 2017 06:03:38 PM GMT+01:00 * - permalink -
    QRCode
    - http://masnun.rocks/2017/04/15/interfaces-in-python-protocols-and-abcs/
    interfaces python golang
  • Intro++ to Go Interfaces · npf.io

    Les interfaces en go c'est vraiment pas simple ... Pour citer l'article :

    Go’s interfaces are one of it’s best features, but they’re also one of the most confusing for newbies.

    mais l'exemple est assez parlant :

    type Walker interface {
        Walk(miles int)
    }
    
    type Camel struct {
        Name string
    }
    
    func (c Camel) Walk(miles int) {
         fmt.Printf(“%s is walking %v miles\n”, c.Name, miles)
    }
    
    func LongWalk(w Walker) {
         w.Walk(500)
         w.Walk(500)
    }
    
    func main() {
        c := Camel{“Bill”}
        LongWalk(c)
    }
    
    // prints
    // Bill is walking 500 miles.
    // Bill is walking 500 miles.
    December 10, 2017 05:59:11 PM GMT+01:00 * - permalink -
    QRCode
    - https://npf.io/2014/05/intro-to-go-interfaces/
    golang go interfaces
Links per page: 20 50 100
Shaarli - The personal, minimalist, super-fast, database free, bookmarking service by the Shaarli community - Help/documentation