Upgrade to Pro — share decks privately, control downloads, hide ads and more …

ForLoopMorocco: GO INIT, A GENTLE INITIATION TO...

ForLoopMorocco: GO INIT, A GENTLE INITIATION TO GOLANG

Go/Golang has become one of the most loved languages by developers, and rank #1 this year (2019) as the language most developers want to learn (*hackerrank).

In this conference talk using a slide/demo/replay mode, we try to allow people to get a first experience on what this awesome programming language brings to the table.

Avatar for mohamed ez-zarghili

mohamed ez-zarghili

March 23, 2019

More Decks by mohamed ez-zarghili

Other Decks in Programming

Transcript

  1. @ezzarghili “Everyone you will ever meet will know something you

    don’t.” - Bill Nye • Procedural vs OOP vs FP vs CSP • Compiled vs interpreted • Static vs dynamic typing Learn Why?
  2. @ezzarghili “I not only use all the brains that I

    have, but all that I can borrow.” - Woodrow Wilson • Syntax • CSP concepts • Duck typing • Tooling concepts Borrow Why?
  3. @ezzarghili “The ability to simplify means to eliminate the unnecessary

    so that the necessary may speak.” - Hans Hofmann • No overloading • No type hierarchy • No exceptions • Wait for generics Drop Why?
  4. Why? @ezzarghili “If I seen further it is by standing

    on the shoulders of giants.” - Issac Newton • Ultrafast Compilation • Errors are values • Composition/strong duck typing • stdlib a.k.a included batteries • Integrated tools • Compatibility promise • Lightweight CSP Concurrency with goroutines Improve
  5. Identifiers & Keywords @ezzarghili Identifiers Unicode Standard 8.0 letters and

    digits No composed characters MixedCace mixedCace 25 keywords
  6. Object-based @ezzarghili Duck typing → “if it quacks like a

    duck it’s a duck” duck test Everything is interface{} “interface{} says nothing*” Type Composition → Oriented Object’s like capabilities * Rob Pike’s https://go-proverbs.github.io/
  7. Functional @ezzarghili Higher order functions → Use wherever you can

    use expressions + Currying and Partial Functions Eager vs Lazy Evaluation → Eager Evaluation, goroutine and channels to emulate laziness Tail-call optimization → No, For performance reasons
  8. Concurrent @ezzarghili Concurrency ≠ Parallelism Core #1 Core #2 Core

    #1 Work Groups “sync” Select Statement goroutine channel Mutex CSP
  9. go-proverbs @ezzarghili More at go-proverbs.github.io “Cgo is not Go.” “Clear

    is better than clever.” “Don't panic.” “Documentation is for users.”
  10. ... Thank you Go plugin for vscode vim-go from Fatih

    Arslan https://tour.golang.org/ https://golang.org/doc/effective_go.html https://gobyexample.com/ https://go-proverbs.github.io/ https://www.gopl.io/ book:The Go Programming Language https://go-proverbs.github.io https://godoc.org/ Resources @ezzarghili