SlideShare ist ein Scribd-Unternehmen logo
1 von 23
An Evening with…

Arkho Innova Meetup Series
Go Lang
ARKHO Innova
Meetup series
Gracias por su asistencia!!!
• Un espacio para compartir experiencias y conocimiento
• Un espacio para hacer relaciones entre personas y
equipos con intereses afines
• Un espacio para pasarla bien
Go: Lenguaje de
Programación
package main
import "fmt"
func main() {
fmt.Println("Hola 🌎")
}
Hola 🌎
Historia
Robert Griesemer, Rob Pike y Ken Thompson comenzaron el proyecto en
Google el 2007.
Alrededor de 2008 el lenguaje fue mayormente diseñado y comenzó a
funcionar la implementación del compilador y el runtime.
Ian Lance Taylor y Russ Cox ingresaron el 2008.
Se vuelve un proyecto de código abierto el 2009.
Primera versión estable el 2012.
Historia
Google tenia las siguientes necesidades internas que no podía cubrir:
• Facilidad en programación concurrente.
• Velocidad de compilación.
• Rapidez de despliegue en sistemas distribuidos.
• Aprovechar características multicore.
• Velocidad, Confiabilidad y Simplicidad.
Motivos
Facilitar la creación de software:
• Eficiente (rendimiento aproximado a C).
• Diseñado para hardware moderno (multi-core, red).
• Seguro: a nivel de tipado de datos y memoria.
• Divertido de desarrollar.
Aunque inicialmente estaba orientado para crear “System programs” (CLI
apps, Web servers) resultó ser un gran lenguaje de propósito general.
Objetivos
• Conceptos fáciles de entender.
• No necesidad de pre-declarar cada intención.
• Si algo anda mal debe ser detectado.
Objetivos
• Lenguaje compilado.
• Tipado estático.
• Permite escribir programas concurrentes de manera fácil y menos
propenso a errores.
• Con Garbage Collector.
• Multiplataforma: Windows, Linux, OS X, FreeBSD.
• Fácil de desplegar.
• Compilación rápida.
• Excelente rendimiento.
Características
• 25 keywords
Características
break default func interface select
case defer go map struct
chan else goto package swich
const fallthrough if range type
continue for import return var
• Archivos compilados son específicos para cada OS.
• Aplicaciones tienen el runtime “linked statically”.
• No require una máquina virtual externa.
• Lenguajes ancestros:
• Go está diseñado como una siguiente generación del lenguaje C.
• Go toma prestado alguna sintaxis de C.
• También toma prestado de Pascal, Modula, Oberon.
• Go intenta reducir la cantidad de tipeo.
Características
Implementa algunas características críticas de orientación a objetos:
• Interfaces
• Custom types pueden implementar una o más interfaces.
• Types implementan interfaces implicitamente , simplemente
implementando los métodos de la interfaz.
• Custom types pueden tener member methods.
¿Es orientado a objetos?
No soporta:
• Herencia de type.
• Conversión implícita de números.
¿Es orientado a objetos?
type persona struct {
edad int
nombre string
}
func (p persona) resumen() string {
strEdad := fmt.Sprintf("%d", p.edad)
return "La edad de " + p.nombre + " es " + strEdad
}
func main() {
ella := persona{edad: 20, nombre: “Alex“}
fmt.Println(ella.resumen())
}
¿Es orientado a objetos?
https://github.com/golang/go/wiki/GoUsers
• Docker
• Dropbox
• MongoDB
• Uber
• Netflix
• Mercadolibre
Quiénes lo usan
-Sitio official:
https://golang.org
-Tour:
https://tour.golang.org
-Ides: https://github.com/golang/go/wiki/IDEsAndTextEditorPlugins
-Lista de frameworks, librerías y software:
https://awesome-go.com
Primeros pasos
(5to) lenguaje más amado: 63.3 %
(3ro) más buscado: 13.5%
Top paying:
US: (1ro) $110.000
Worldwide: (5to) $64.516
Fuente: https://stackoverflow.com/insights/survey/2017
Stackoverflow developer survey
2017
• Case sensitive.
• Todas las variables tienen un tipo asignado.
• La asignación de tipo de variable puede ser explícita o implícita.
• Funciones y campos que se exportan deben tener la primera letra
mayúscula.
• Punto y coma no es necesario.
• Salto de línea termina un statement.
• Bloques de código deben ir dentro {}.
Sintaxis esencial
• Funciones disponibles integradas que pertenecen al package builtin:
len(string) retorna el largo de un string
panic(error) detiene la ejecución y muestra un mensaje
Sintaxis esencial
Aplicación de ejemplo
package main
import (
"fmt"
"net/http"
)
func handler(w http.ResponseWriter, r *http.Request) {
mensaje := "Docker (U0001f40b) está escrito en Go"
fmt.Fprint(w, "<h1>"+mensaje+"</h1>")
}
func main() {
http.HandleFunc("/", handler)
http.ListenAndServe(":7800", nil)
}
An Evening with…

Arkho Innova Meetup Series
Go Lang
Con ganas de más… (Links en vivo)
• Visualizing Concurrency in Go

http://divan.github.io/posts/go_concurrency_visualize/
• A 3D Game Engine

https://azul3d.org/
• Open Source 2D Game Engine

https://engo.io/concepts/animation.html
• High Productivity web Framework

https://revel.github.io/
• Built with

https://trends.builtwith.com/framework
• Module Availability

http://www.modulecounts.com/
• Meetup sample code

https://github.com/arkhotech/meetup-go

Weitere ähnliche Inhalte

Was ist angesagt?

Introduce to Rust-A Powerful System Language
Introduce to Rust-A Powerful System LanguageIntroduce to Rust-A Powerful System Language
Introduce to Rust-A Powerful System Language安齊 劉
 
Event driven programming amazeballs
Event driven programming amazeballsEvent driven programming amazeballs
Event driven programming amazeballsMsWillcox
 
自律走行ロボットをプログラミングするということ ~ETロボコンの場合~
自律走行ロボットをプログラミングするということ ~ETロボコンの場合~自律走行ロボットをプログラミングするということ ~ETロボコンの場合~
自律走行ロボットをプログラミングするということ ~ETロボコンの場合~Shin-ya Koga
 
JavaScriptでSQLを唱えたいだけの人生だった
JavaScriptでSQLを唱えたいだけの人生だったJavaScriptでSQLを唱えたいだけの人生だった
JavaScriptでSQLを唱えたいだけの人生だったiPride Co., Ltd.
 
Clean Code @Voxxed Days Cluj 2023 - opening Keynote
Clean Code @Voxxed Days Cluj 2023 - opening KeynoteClean Code @Voxxed Days Cluj 2023 - opening Keynote
Clean Code @Voxxed Days Cluj 2023 - opening KeynoteVictor Rentea
 
Let's Learn Ruby - Basic
Let's Learn Ruby - BasicLet's Learn Ruby - Basic
Let's Learn Ruby - BasicEddie Kao
 
Hardware Hacking area: Make Cool Things with Microcontrollers (and learn to s...
Hardware Hacking area: Make Cool Things with Microcontrollers (and learn to s...Hardware Hacking area: Make Cool Things with Microcontrollers (and learn to s...
Hardware Hacking area: Make Cool Things with Microcontrollers (and learn to s...codebits
 
Cloudflare Pages/Workersとは
Cloudflare Pages/WorkersとはCloudflare Pages/Workersとは
Cloudflare Pages/WorkersとはHiroshi Morishige
 
Docker活用パターンの整理 ― どう組み合わせるのが正解?!
Docker活用パターンの整理 ― どう組み合わせるのが正解?!Docker活用パターンの整理 ― どう組み合わせるのが正解?!
Docker活用パターンの整理 ― どう組み合わせるのが正解?!Etsuji Nakai
 
イベント駆動プログラミングとI/O多重化
イベント駆動プログラミングとI/O多重化イベント駆動プログラミングとI/O多重化
イベント駆動プログラミングとI/O多重化Gosuke Miyashita
 
ReactorKit으로 단방향 반응형 앱 만들기
ReactorKit으로 단방향 반응형 앱 만들기ReactorKit으로 단방향 반응형 앱 만들기
ReactorKit으로 단방향 반응형 앱 만들기Suyeol Jeon
 
F#入門 ~関数プログラミングとは何か~
F#入門 ~関数プログラミングとは何か~F#入門 ~関数プログラミングとは何か~
F#入門 ~関数プログラミングとは何か~Nobuhisa Koizumi
 
Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi
Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi
Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi Professor Lili Saghafi
 
How I learned to time travel, or, data pipelining and scheduling with Airflow
How I learned to time travel, or, data pipelining and scheduling with AirflowHow I learned to time travel, or, data pipelining and scheduling with Airflow
How I learned to time travel, or, data pipelining and scheduling with AirflowPyData
 
OrientDB for real & Web App development
OrientDB for real & Web App developmentOrientDB for real & Web App development
OrientDB for real & Web App developmentLuca Garulli
 
Introduction to the basics of Python programming (part 1)
Introduction to the basics of Python programming (part 1)Introduction to the basics of Python programming (part 1)
Introduction to the basics of Python programming (part 1)Pedro Rodrigues
 
Apache Spark Fundamentals
Apache Spark FundamentalsApache Spark Fundamentals
Apache Spark FundamentalsZahra Eskandari
 

Was ist angesagt? (20)

Introduce to Rust-A Powerful System Language
Introduce to Rust-A Powerful System LanguageIntroduce to Rust-A Powerful System Language
Introduce to Rust-A Powerful System Language
 
Event driven programming amazeballs
Event driven programming amazeballsEvent driven programming amazeballs
Event driven programming amazeballs
 
自律走行ロボットをプログラミングするということ ~ETロボコンの場合~
自律走行ロボットをプログラミングするということ ~ETロボコンの場合~自律走行ロボットをプログラミングするということ ~ETロボコンの場合~
自律走行ロボットをプログラミングするということ ~ETロボコンの場合~
 
JavaScriptでSQLを唱えたいだけの人生だった
JavaScriptでSQLを唱えたいだけの人生だったJavaScriptでSQLを唱えたいだけの人生だった
JavaScriptでSQLを唱えたいだけの人生だった
 
Clean Code @Voxxed Days Cluj 2023 - opening Keynote
Clean Code @Voxxed Days Cluj 2023 - opening KeynoteClean Code @Voxxed Days Cluj 2023 - opening Keynote
Clean Code @Voxxed Days Cluj 2023 - opening Keynote
 
PHPにおけるI/O多重化とyield
PHPにおけるI/O多重化とyieldPHPにおけるI/O多重化とyield
PHPにおけるI/O多重化とyield
 
Let's Learn Ruby - Basic
Let's Learn Ruby - BasicLet's Learn Ruby - Basic
Let's Learn Ruby - Basic
 
Hardware Hacking area: Make Cool Things with Microcontrollers (and learn to s...
Hardware Hacking area: Make Cool Things with Microcontrollers (and learn to s...Hardware Hacking area: Make Cool Things with Microcontrollers (and learn to s...
Hardware Hacking area: Make Cool Things with Microcontrollers (and learn to s...
 
Cloudflare Pages/Workersとは
Cloudflare Pages/WorkersとはCloudflare Pages/Workersとは
Cloudflare Pages/Workersとは
 
Docker活用パターンの整理 ― どう組み合わせるのが正解?!
Docker活用パターンの整理 ― どう組み合わせるのが正解?!Docker活用パターンの整理 ― どう組み合わせるのが正解?!
Docker活用パターンの整理 ― どう組み合わせるのが正解?!
 
イベント駆動プログラミングとI/O多重化
イベント駆動プログラミングとI/O多重化イベント駆動プログラミングとI/O多重化
イベント駆動プログラミングとI/O多重化
 
ReactorKit으로 단방향 반응형 앱 만들기
ReactorKit으로 단방향 반응형 앱 만들기ReactorKit으로 단방향 반응형 앱 만들기
ReactorKit으로 단방향 반응형 앱 만들기
 
Node js introduction
Node js introductionNode js introduction
Node js introduction
 
Kids coding
Kids codingKids coding
Kids coding
 
F#入門 ~関数プログラミングとは何か~
F#入門 ~関数プログラミングとは何か~F#入門 ~関数プログラミングとは何か~
F#入門 ~関数プログラミングとは何か~
 
Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi
Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi
Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi
 
How I learned to time travel, or, data pipelining and scheduling with Airflow
How I learned to time travel, or, data pipelining and scheduling with AirflowHow I learned to time travel, or, data pipelining and scheduling with Airflow
How I learned to time travel, or, data pipelining and scheduling with Airflow
 
OrientDB for real & Web App development
OrientDB for real & Web App developmentOrientDB for real & Web App development
OrientDB for real & Web App development
 
Introduction to the basics of Python programming (part 1)
Introduction to the basics of Python programming (part 1)Introduction to the basics of Python programming (part 1)
Introduction to the basics of Python programming (part 1)
 
Apache Spark Fundamentals
Apache Spark FundamentalsApache Spark Fundamentals
Apache Spark Fundamentals
 

Ähnlich wie An Evening with... Go Lang

Gnome - un vistazo a su arquitectura
Gnome - un vistazo a su arquitecturaGnome - un vistazo a su arquitectura
Gnome - un vistazo a su arquitecturaMauro Parra-Miranda
 
Lenguaje de programción en internet
Lenguaje de programción en internetLenguaje de programción en internet
Lenguaje de programción en internetlorenzosc1995
 
Lenguaje de programción en internet
Lenguaje de programción en internetLenguaje de programción en internet
Lenguaje de programción en internetlorenzosc1995
 
Mi lenguaje de programación de preferencia
Mi lenguaje de programación de preferenciaMi lenguaje de programación de preferencia
Mi lenguaje de programación de preferenciaglfloresgilberto
 
Alta disponibilidad y balanceo de carga con Linux y nginx
Alta disponibilidad y balanceo de carga con Linux y nginxAlta disponibilidad y balanceo de carga con Linux y nginx
Alta disponibilidad y balanceo de carga con Linux y nginxPlain Concepts
 
01 T1 2021 Sistemas Embebidos.pptx
01 T1 2021 Sistemas Embebidos.pptx01 T1 2021 Sistemas Embebidos.pptx
01 T1 2021 Sistemas Embebidos.pptxDyllanBastidas
 
Mi lenguaje de programación de preferencia
Mi lenguaje de programación de preferenciaMi lenguaje de programación de preferencia
Mi lenguaje de programación de preferenciaJacob
 
P2 act1 cuadro comparativo
P2 act1 cuadro comparativoP2 act1 cuadro comparativo
P2 act1 cuadro comparativoRoberto Cortez
 
Desarrollo Software Entornos G N U Linux Una Final
Desarrollo  Software Entornos  G N U  Linux Una FinalDesarrollo  Software Entornos  G N U  Linux Una Final
Desarrollo Software Entornos G N U Linux Una FinalEdgardo Ramos Roque
 
1___LENGUAJES DE PROGRAMACION_2023.pdf
1___LENGUAJES DE PROGRAMACION_2023.pdf1___LENGUAJES DE PROGRAMACION_2023.pdf
1___LENGUAJES DE PROGRAMACION_2023.pdfMariaTeresaGarznPrez
 
BilboStack - Php en el 2012
BilboStack - Php en el 2012BilboStack - Php en el 2012
BilboStack - Php en el 2012Asier Marqués
 
Software en la actualidad
Software en la actualidadSoftware en la actualidad
Software en la actualidadRaelyx Cordero
 

Ähnlich wie An Evening with... Go Lang (20)

Go
GoGo
Go
 
Charla introducción a processing - 2010/09
Charla introducción a processing - 2010/09Charla introducción a processing - 2010/09
Charla introducción a processing - 2010/09
 
Gnome - un vistazo a su arquitectura
Gnome - un vistazo a su arquitecturaGnome - un vistazo a su arquitectura
Gnome - un vistazo a su arquitectura
 
Lenguaje de programción en internet
Lenguaje de programción en internetLenguaje de programción en internet
Lenguaje de programción en internet
 
Lenguaje de programción en internet
Lenguaje de programción en internetLenguaje de programción en internet
Lenguaje de programción en internet
 
Mi lenguaje de programación de preferencia
Mi lenguaje de programación de preferenciaMi lenguaje de programación de preferencia
Mi lenguaje de programación de preferencia
 
Alta disponibilidad y balanceo de carga con Linux y nginx
Alta disponibilidad y balanceo de carga con Linux y nginxAlta disponibilidad y balanceo de carga con Linux y nginx
Alta disponibilidad y balanceo de carga con Linux y nginx
 
01 - Introducción al lenguaje C
01 - Introducción al lenguaje C01 - Introducción al lenguaje C
01 - Introducción al lenguaje C
 
Presentacion cw2012
Presentacion cw2012Presentacion cw2012
Presentacion cw2012
 
01 T1 2021 Sistemas Embebidos.pptx
01 T1 2021 Sistemas Embebidos.pptx01 T1 2021 Sistemas Embebidos.pptx
01 T1 2021 Sistemas Embebidos.pptx
 
Mi lenguaje de programación de preferencia
Mi lenguaje de programación de preferenciaMi lenguaje de programación de preferencia
Mi lenguaje de programación de preferencia
 
P2 act1 cuadro comparativo
P2 act1 cuadro comparativoP2 act1 cuadro comparativo
P2 act1 cuadro comparativo
 
Introducción a TypeScript
Introducción a TypeScriptIntroducción a TypeScript
Introducción a TypeScript
 
Desarrollo Software Entornos G N U Linux Una Final
Desarrollo  Software Entornos  G N U  Linux Una FinalDesarrollo  Software Entornos  G N U  Linux Una Final
Desarrollo Software Entornos G N U Linux Una Final
 
ASP.NET 5 - DotNetters
ASP.NET 5 - DotNettersASP.NET 5 - DotNetters
ASP.NET 5 - DotNetters
 
20170405 - Ecosistema Javascript
20170405 - Ecosistema Javascript20170405 - Ecosistema Javascript
20170405 - Ecosistema Javascript
 
1___LENGUAJES DE PROGRAMACION_2023.pdf
1___LENGUAJES DE PROGRAMACION_2023.pdf1___LENGUAJES DE PROGRAMACION_2023.pdf
1___LENGUAJES DE PROGRAMACION_2023.pdf
 
BilboStack - Php en el 2012
BilboStack - Php en el 2012BilboStack - Php en el 2012
BilboStack - Php en el 2012
 
Software en la actualidad
Software en la actualidadSoftware en la actualidad
Software en la actualidad
 
IDEs y Frameworks mas utilizados
IDEs y Frameworks mas utilizadosIDEs y Frameworks mas utilizados
IDEs y Frameworks mas utilizados
 

Mehr von Arkhotech

An Evening with Agile lean design_thinking
An Evening with Agile lean design_thinkingAn Evening with Agile lean design_thinking
An Evening with Agile lean design_thinkingArkhotech
 
An Evening with Meetup microservices-s2
An Evening with Meetup microservices-s2An Evening with Meetup microservices-s2
An Evening with Meetup microservices-s2Arkhotech
 
An evening with...Rust
An evening with...RustAn evening with...Rust
An evening with...RustArkhotech
 
An evening with... Docker
An evening with... DockerAn evening with... Docker
An evening with... DockerArkhotech
 
An evening with "Rework" - Reinventando nuestra forma de trabajar
An evening with "Rework" - Reinventando nuestra forma de trabajarAn evening with "Rework" - Reinventando nuestra forma de trabajar
An evening with "Rework" - Reinventando nuestra forma de trabajarArkhotech
 
An evening with... Microservices - Session 1
An evening with... Microservices - Session 1An evening with... Microservices - Session 1
An evening with... Microservices - Session 1Arkhotech
 
An evening with... Scrum
An evening with... ScrumAn evening with... Scrum
An evening with... ScrumArkhotech
 
An evening with... Liquidbase
An evening with... LiquidbaseAn evening with... Liquidbase
An evening with... LiquidbaseArkhotech
 
An evening with... DevOps
An evening with... DevOpsAn evening with... DevOps
An evening with... DevOpsArkhotech
 
An evening with ... Ionic Framework Meetup
An evening with ... Ionic Framework Meetup An evening with ... Ionic Framework Meetup
An evening with ... Ionic Framework Meetup Arkhotech
 
An evening with... BPM redhat Meetup
An evening with... BPM redhat MeetupAn evening with... BPM redhat Meetup
An evening with... BPM redhat MeetupArkhotech
 
An evening with... Continuous Integration and Bamboo intro Meetup
An evening with... Continuous Integration and Bamboo intro MeetupAn evening with... Continuous Integration and Bamboo intro Meetup
An evening with... Continuous Integration and Bamboo intro MeetupArkhotech
 
An evening with... Agile Metrics Meetup
An evening with... Agile Metrics MeetupAn evening with... Agile Metrics Meetup
An evening with... Agile Metrics MeetupArkhotech
 
An evening with... Apache hadoop Meetup
An evening with...  Apache hadoop MeetupAn evening with...  Apache hadoop Meetup
An evening with... Apache hadoop MeetupArkhotech
 
An evening with... Polymer Intro Meetup
An evening with... Polymer Intro MeetupAn evening with... Polymer Intro Meetup
An evening with... Polymer Intro MeetupArkhotech
 
An evening with... Oracle Endeca Guided Search & Experience Manager Meetup
An evening with... Oracle Endeca Guided Search & Experience Manager MeetupAn evening with... Oracle Endeca Guided Search & Experience Manager Meetup
An evening with... Oracle Endeca Guided Search & Experience Manager MeetupArkhotech
 
An evening with... No SQL Meetup
An evening with... No SQL MeetupAn evening with... No SQL Meetup
An evening with... No SQL MeetupArkhotech
 

Mehr von Arkhotech (17)

An Evening with Agile lean design_thinking
An Evening with Agile lean design_thinkingAn Evening with Agile lean design_thinking
An Evening with Agile lean design_thinking
 
An Evening with Meetup microservices-s2
An Evening with Meetup microservices-s2An Evening with Meetup microservices-s2
An Evening with Meetup microservices-s2
 
An evening with...Rust
An evening with...RustAn evening with...Rust
An evening with...Rust
 
An evening with... Docker
An evening with... DockerAn evening with... Docker
An evening with... Docker
 
An evening with "Rework" - Reinventando nuestra forma de trabajar
An evening with "Rework" - Reinventando nuestra forma de trabajarAn evening with "Rework" - Reinventando nuestra forma de trabajar
An evening with "Rework" - Reinventando nuestra forma de trabajar
 
An evening with... Microservices - Session 1
An evening with... Microservices - Session 1An evening with... Microservices - Session 1
An evening with... Microservices - Session 1
 
An evening with... Scrum
An evening with... ScrumAn evening with... Scrum
An evening with... Scrum
 
An evening with... Liquidbase
An evening with... LiquidbaseAn evening with... Liquidbase
An evening with... Liquidbase
 
An evening with... DevOps
An evening with... DevOpsAn evening with... DevOps
An evening with... DevOps
 
An evening with ... Ionic Framework Meetup
An evening with ... Ionic Framework Meetup An evening with ... Ionic Framework Meetup
An evening with ... Ionic Framework Meetup
 
An evening with... BPM redhat Meetup
An evening with... BPM redhat MeetupAn evening with... BPM redhat Meetup
An evening with... BPM redhat Meetup
 
An evening with... Continuous Integration and Bamboo intro Meetup
An evening with... Continuous Integration and Bamboo intro MeetupAn evening with... Continuous Integration and Bamboo intro Meetup
An evening with... Continuous Integration and Bamboo intro Meetup
 
An evening with... Agile Metrics Meetup
An evening with... Agile Metrics MeetupAn evening with... Agile Metrics Meetup
An evening with... Agile Metrics Meetup
 
An evening with... Apache hadoop Meetup
An evening with...  Apache hadoop MeetupAn evening with...  Apache hadoop Meetup
An evening with... Apache hadoop Meetup
 
An evening with... Polymer Intro Meetup
An evening with... Polymer Intro MeetupAn evening with... Polymer Intro Meetup
An evening with... Polymer Intro Meetup
 
An evening with... Oracle Endeca Guided Search & Experience Manager Meetup
An evening with... Oracle Endeca Guided Search & Experience Manager MeetupAn evening with... Oracle Endeca Guided Search & Experience Manager Meetup
An evening with... Oracle Endeca Guided Search & Experience Manager Meetup
 
An evening with... No SQL Meetup
An evening with... No SQL MeetupAn evening with... No SQL Meetup
An evening with... No SQL Meetup
 

An Evening with... Go Lang

  • 1. An Evening with…
 Arkho Innova Meetup Series Go Lang
  • 2. ARKHO Innova Meetup series Gracias por su asistencia!!! • Un espacio para compartir experiencias y conocimiento • Un espacio para hacer relaciones entre personas y equipos con intereses afines • Un espacio para pasarla bien
  • 4. package main import "fmt" func main() { fmt.Println("Hola 🌎") } Hola 🌎
  • 5. Historia Robert Griesemer, Rob Pike y Ken Thompson comenzaron el proyecto en Google el 2007.
  • 6. Alrededor de 2008 el lenguaje fue mayormente diseñado y comenzó a funcionar la implementación del compilador y el runtime. Ian Lance Taylor y Russ Cox ingresaron el 2008. Se vuelve un proyecto de código abierto el 2009. Primera versión estable el 2012. Historia
  • 7. Google tenia las siguientes necesidades internas que no podía cubrir: • Facilidad en programación concurrente. • Velocidad de compilación. • Rapidez de despliegue en sistemas distribuidos. • Aprovechar características multicore. • Velocidad, Confiabilidad y Simplicidad. Motivos
  • 8. Facilitar la creación de software: • Eficiente (rendimiento aproximado a C). • Diseñado para hardware moderno (multi-core, red). • Seguro: a nivel de tipado de datos y memoria. • Divertido de desarrollar. Aunque inicialmente estaba orientado para crear “System programs” (CLI apps, Web servers) resultó ser un gran lenguaje de propósito general. Objetivos
  • 9. • Conceptos fáciles de entender. • No necesidad de pre-declarar cada intención. • Si algo anda mal debe ser detectado. Objetivos
  • 10. • Lenguaje compilado. • Tipado estático. • Permite escribir programas concurrentes de manera fácil y menos propenso a errores. • Con Garbage Collector. • Multiplataforma: Windows, Linux, OS X, FreeBSD. • Fácil de desplegar. • Compilación rápida. • Excelente rendimiento. Características
  • 11. • 25 keywords Características break default func interface select case defer go map struct chan else goto package swich const fallthrough if range type continue for import return var
  • 12. • Archivos compilados son específicos para cada OS. • Aplicaciones tienen el runtime “linked statically”. • No require una máquina virtual externa. • Lenguajes ancestros: • Go está diseñado como una siguiente generación del lenguaje C. • Go toma prestado alguna sintaxis de C. • También toma prestado de Pascal, Modula, Oberon. • Go intenta reducir la cantidad de tipeo. Características
  • 13. Implementa algunas características críticas de orientación a objetos: • Interfaces • Custom types pueden implementar una o más interfaces. • Types implementan interfaces implicitamente , simplemente implementando los métodos de la interfaz. • Custom types pueden tener member methods. ¿Es orientado a objetos?
  • 14. No soporta: • Herencia de type. • Conversión implícita de números. ¿Es orientado a objetos?
  • 15. type persona struct { edad int nombre string } func (p persona) resumen() string { strEdad := fmt.Sprintf("%d", p.edad) return "La edad de " + p.nombre + " es " + strEdad } func main() { ella := persona{edad: 20, nombre: “Alex“} fmt.Println(ella.resumen()) } ¿Es orientado a objetos?
  • 16. https://github.com/golang/go/wiki/GoUsers • Docker • Dropbox • MongoDB • Uber • Netflix • Mercadolibre Quiénes lo usan
  • 18. (5to) lenguaje más amado: 63.3 % (3ro) más buscado: 13.5% Top paying: US: (1ro) $110.000 Worldwide: (5to) $64.516 Fuente: https://stackoverflow.com/insights/survey/2017 Stackoverflow developer survey 2017
  • 19. • Case sensitive. • Todas las variables tienen un tipo asignado. • La asignación de tipo de variable puede ser explícita o implícita. • Funciones y campos que se exportan deben tener la primera letra mayúscula. • Punto y coma no es necesario. • Salto de línea termina un statement. • Bloques de código deben ir dentro {}. Sintaxis esencial
  • 20. • Funciones disponibles integradas que pertenecen al package builtin: len(string) retorna el largo de un string panic(error) detiene la ejecución y muestra un mensaje Sintaxis esencial
  • 21. Aplicación de ejemplo package main import ( "fmt" "net/http" ) func handler(w http.ResponseWriter, r *http.Request) { mensaje := "Docker (U0001f40b) est&aacute; escrito en Go" fmt.Fprint(w, "<h1>"+mensaje+"</h1>") } func main() { http.HandleFunc("/", handler) http.ListenAndServe(":7800", nil) }
  • 22. An Evening with…
 Arkho Innova Meetup Series Go Lang
  • 23. Con ganas de más… (Links en vivo) • Visualizing Concurrency in Go
 http://divan.github.io/posts/go_concurrency_visualize/ • A 3D Game Engine
 https://azul3d.org/ • Open Source 2D Game Engine
 https://engo.io/concepts/animation.html • High Productivity web Framework
 https://revel.github.io/ • Built with
 https://trends.builtwith.com/framework • Module Availability
 http://www.modulecounts.com/ • Meetup sample code
 https://github.com/arkhotech/meetup-go