SlideShare une entreprise Scribd logo
1  sur  73
Télécharger pour lire hors ligne
Ruby is dying
What languages are cool now?
Michał Konarski
u2i.com
Seriously, is Ruby dying?
Ruby Go
https://blog.whoishiring.io/hacker-news-who-is-hiring-thread-part-1/
Who is hiring?
But let’s look from a different angle...
http://www.tiobe.com/
TIOBE Index
Well, not exactly.
But what languages are cool now?
Let’s look at six of them
Swift
Swift
● designed by Apple
● released in 2014
● created for iOS, macOS, tvOS
● multi-paradigm
● statically, strongly typed
● compiled
namespacesgenerics
closures
tuples
operator overloading
native collections
type inference
pattern matching
multiple return types
Read-Eval-Print-Loop (REPL)
Swift features
Nothing really outstanding.
So, what’s the story behind Swift?
“We absolutely loved Objective-C, but
we had to ask ourselves a question -
what would it be like if we had
Objective-C without the baggage of C?”
Tim Cook
It’s mainly because Objective-C is bad.
And they had nothing else.
@interface Foo : NSObject
@property (readonly) int bar;
- (instancetype)initWithBar:(int)bar;
+ (instancetype)fooWithBar:(int)bar;
@end
@implementation Foo
- (instancetype)initWithBar:(int)bar {
self = [super init];
if (self) {
_bar = bar;
}
return self;
}
+ (instancetype)fooWithBar:(int)bar {
return [[self alloc] initWithBar:bar];
}
@end
How bad is Objective-C?
http://www.antonzherdev.com/post/70064588471/top-13-worst-things-about-objective-c
Swift is easier to read
Objective-C
if (myDelegate != nil) {
if ([myDelegate respondsToSelector:
@selector(scrollViewDidScroll:)]) {
[myDelegate scrollViewDidScroll:myScrollView]
}
}
Swift
myDelegate?.scrollViewDidScroll?(myScrollView)
Why also Swift is better?
● no need to have two separate files (code and headers)
● it’s safer (runtime crash on null pointer)
● it has automatic ARC (Automatic Reference Counting)
● it’s faster
● it requires less code
● it has namespaces
It’s not only a language
XCode 8
https://developer.apple.com/xcode/
It’s not only a language
Swift Playgrounds
http://www.apple.com/swift/playgrounds/
● sponsored by Mozilla
● announced in 2010
● first release in 2012
● stable release in 2015
● statically, strongly typed
● multi-paradigm
● compiled
“The goal of the project is to
design and implement a safe,
concurrent, practical systems
language”
Rust FAQ
There are not such languages?
Apparently not.
Current languages are wrong
● there is too little attention paid to safety
● they have poor concurrency support
● they offer limited control over resources
● they stick too much to paradigm
So let’s create a new high-low level
language!
Rust is a high level language!
● generics
● traits
● pattern matching
● closures
● type inference
● automatic memory allocation and deallocation
● guaranteed memory safety
● threads without data races
Rust is a low level language!
● no garbage collector
● manual memory management
● zero-cost abstractions
● minimal runtime
● as fast as C/C++
Guaranteed memory safety? How?
Ownership
fn foo() {
let v1 = vec![1, 2, 3];
let v2 = v1;
println!("v1[0] is: {}", v1[0]);
}
error: use of moved value: `v
You can’t have two references to the
same object!
Ownership
stack heap
[1, 2, 3]
v1
v2
There are more such mechanisms.
Future of Rust
● currently two big projects: servo and rust
● other smaller projects: redox, cgmath, Iron, rust-doom
● it changes very quickly
● it has a good opinion in the community
● it will be hard to replace C/C++
● It has a steep learning curve
Go
Go
● designed in Google in 2007
● first release in 2009
● stable release in 2016
● statically, strongly typed
● multi-paradigm, concurrent
● compiled
Standard languages (Java, C++)
● are very strong: type-safe, effective, efficient
● great in hands of experts
● used to build huge systems and companies
Standard languages (Java, C++)
● hard to use
● compilers are slow
● binaries are huge
● desperately need language-aware tools
● poorly adapt to clouds, multicore CPUs
Simpler languages (Python, Ruby, JS)
● easier to learn
● dynamically typed (fewer keystrokes)
● interpreted (no compiler to wait for)
● good tools (interpreters make things easier)
Simpler languages (Python, Ruby, JS)
● slow
● not type-safe
● hard to maintain in a big project
● very poor at scale
● not very modern
What if we had a static language with
dynamic-like syntax?
A niche for a language
● understandable
● statically typed
● productive and readable
● fast to work in
● scales well
● doesn't require tools, but supports them well
● good at networking and multiprocessing
Features of Go
● syntax typical for dynamic languages
● type inference
● fast compilation
● garbage collector
● memory safety features
● built-in concurrency
● object oriented without classes and inheritance
● lack of generics
● compiles to small statically linked binaries
Interfaces
type Animal interface {
Speak() string
}
type Dog struct {
}
func (d Dog) Speak() string {
return "Woof!"
}
func SaySomething(a Animal) {
fmt.Println(a.Speak())
}
func main() {
dog := Dog{}
SaySomething(dog)
}
Built-in concurrency!
Goroutines
func main() {
go expensiveComputation(x, y, z)
anotherExpensiveComputation(a, b, c)
}
Channels
func main() {
ch := make(chan int)
go expensiveComputation(x, y, z, ch)
v2 := anotherExpensiveComputation(a, b, c)
v1 := <- ch
fmt.Println(v1, v2)
}
Future of Go
● it’s popularity constantly raises
● it’s backed by Google
● it’s used by Docker, Netflix, Dropbox, CloudFare,
SoundCloud, BBC, New York Times, Uber and others
● it’s seen as a good balance between Java-like languages
and Python-like
● it easy to learn and powerful
● it runs well in cloud environments
● might be a good choice for microservices approach
● created by José Valim
● released in 2012
● functional
● dynamically, strongly typed
● compiled to Erlang VM byte code
Erlang? Processes!
Elixir = Erlang with Ruby syntax
Elixir features
● massively concurrent
● scalable
● fault-tolerant
● great performance
● functional, but practical
● nice Ruby-like syntax
● metaprogramming via macros
Ruby has Rails.
Elixir has Phoenix.
Controllers in Rails
class PagesController < ApplicationController
def index
@title = params[:title]
@members = [
{name: "Chris McCord"},
{name: "Matt Sears"},
{name: "David Stump"},
{name: "Ricardo Thompson"}
]
render "index"
end
end
http://www.littlelines.com/blog/2014/07/08/elixir-vs-ruby-showdown-phoenix-vs-rails/
Controllers in Phoenix
defmodule Benchmarker.Controllers.Pages do
use Phoenix.Controller
def index(conn, %{"title" => title}) do
render conn, "index", title: title, members: [
%{name: "Chris McCord"},
%{name: "Matt Sears"},
%{name: "David Stump"},
%{name: "Ricardo Thompson"}
]
end
end
http://www.littlelines.com/blog/2014/07/08/elixir-vs-ruby-showdown-phoenix-vs-rails/
Future of Elixir
● new Erlang for the masses
● fits highly concurrent niche
● attracts Ruby developers
● no big company behind
● used by Pinterest
● will fly on the wings of Phoenix?
● created by data scientists
● released in 2012
● dynamically, strongly typed
● compiled
Compiled one for fast stuff.
Interpreted one for visualisation.
Data scientists’ two languages problem:
Julia features
● solves scientists’ two language problem
● familiar syntax
● extensive scientific library
● user-defined types
● multiple dispatch
● built-in parallelism
● good performance (comparing to C)
Single dispatch (Ruby)
a.do_something(b, c)
Only a decides which method to choose.
Multiple dispatch
julia> f(x::Float64, y::Float64) = 2x + y;
julia> f(2.0, 3.0)
7.0
julia> f(2.0, 3)
ERROR: MethodError: `f` has no method matching
Here everything decides!
Future of Julia
● R, MATLAB and C competitor
● unifies scientific software stack
● not mature enough yet
● small, but growing number of libraries
● created by Google
● released in 2011
● optionally typed
● interpreted
● translated to JavaScript
Let’s replace JavaScript!
Dart vs JavaScript
● class-based (not prototype-based)
● normal foreach
● named parameters
● operator overriding
● string interpolation
● optional typing
● false is false
● easy DOM operations
Looks familiar
class Point {
num x;
num y;
Point(this.x, this.y);
distanceFromOrigin() {
return sqrt(x * x + y * y);
}
}
main() {
var p = new Point(2, 3);
print(p.distanceFromOrigin());
}
Cascade operator
querySelector('#button')
..text = 'Confirm'
..classes.add('important')
..onClick.listen(
(e) => window.alert('Confirmed!'));
Future of Dart
● 2016 AdWord UI built in Dart
● no Dart VM in browsers
● fragmented community
● client-side future is dim
● backend future looks much better
Sources
● developer.apple.com/swift
● rust-lang.org
● golang.org
● elixir-lang.org
● julialang.org
● dartlang.org
Any questions?
@mjkonarski
michalkonarski
michal.konarski@u2i.com

Contenu connexe

Tendances

Kevin Whinnery: Write Better JavaScript
Kevin Whinnery: Write Better JavaScriptKevin Whinnery: Write Better JavaScript
Kevin Whinnery: Write Better JavaScriptAxway Appcelerator
 
Introduction to Go
Introduction to GoIntroduction to Go
Introduction to Gozhubert
 
Culerity - Headless full stack testing for JavaScript
Culerity - Headless full stack testing for JavaScriptCulerity - Headless full stack testing for JavaScript
Culerity - Headless full stack testing for JavaScriptThilo Utke
 
Truly madly deeply parallel ruby applications
Truly madly deeply parallel ruby applicationsTruly madly deeply parallel ruby applications
Truly madly deeply parallel ruby applicationsHari Krishnan‎
 
Object oriented javascript
Object oriented javascriptObject oriented javascript
Object oriented javascriptGarrison Locke
 
CSP: Huh? And Components
CSP: Huh? And ComponentsCSP: Huh? And Components
CSP: Huh? And ComponentsDaniel Fagnan
 
Ruby in office time reboot
Ruby in office time rebootRuby in office time reboot
Ruby in office time rebootKentaro Goto
 
My month with Ruby
My month with RubyMy month with Ruby
My month with Rubyalextomovski
 
Rubykaigi 2017-nishimotz-v6
Rubykaigi 2017-nishimotz-v6Rubykaigi 2017-nishimotz-v6
Rubykaigi 2017-nishimotz-v6Takuya Nishimoto
 
Actors, a Unifying Pattern for Scalable Concurrency | C4 2006
Actors, a Unifying Pattern for Scalable Concurrency | C4 2006 Actors, a Unifying Pattern for Scalable Concurrency | C4 2006
Actors, a Unifying Pattern for Scalable Concurrency | C4 2006 Real Nobile
 
Ruby, the language of devops
Ruby, the language of devopsRuby, the language of devops
Ruby, the language of devopsRob Kinyon
 
Ruby projects of interest for DevOps
Ruby projects of interest for DevOpsRuby projects of interest for DevOps
Ruby projects of interest for DevOpsRicardo Sanchez
 
Clojure Conj 2014 - Paradigms of core.async - Julian Gamble
Clojure Conj 2014 - Paradigms of core.async - Julian GambleClojure Conj 2014 - Paradigms of core.async - Julian Gamble
Clojure Conj 2014 - Paradigms of core.async - Julian GambleJulian Gamble
 
Perl On The JVM (London.pm Talk 2009-04)
Perl On The JVM (London.pm Talk 2009-04)Perl On The JVM (London.pm Talk 2009-04)
Perl On The JVM (London.pm Talk 2009-04)Ben Evans
 
Applying the paradigms of core.async in Clojure and ClojureScript
Applying the paradigms of core.async in Clojure and ClojureScriptApplying the paradigms of core.async in Clojure and ClojureScript
Applying the paradigms of core.async in Clojure and ClojureScriptJulian Gamble
 
Java Closures
Java ClosuresJava Closures
Java ClosuresBen Evans
 

Tendances (20)

Kevin Whinnery: Write Better JavaScript
Kevin Whinnery: Write Better JavaScriptKevin Whinnery: Write Better JavaScript
Kevin Whinnery: Write Better JavaScript
 
Introduction to Go
Introduction to GoIntroduction to Go
Introduction to Go
 
Culerity - Headless full stack testing for JavaScript
Culerity - Headless full stack testing for JavaScriptCulerity - Headless full stack testing for JavaScript
Culerity - Headless full stack testing for JavaScript
 
Truly madly deeply parallel ruby applications
Truly madly deeply parallel ruby applicationsTruly madly deeply parallel ruby applications
Truly madly deeply parallel ruby applications
 
Object oriented javascript
Object oriented javascriptObject oriented javascript
Object oriented javascript
 
CSP: Huh? And Components
CSP: Huh? And ComponentsCSP: Huh? And Components
CSP: Huh? And Components
 
Ruby in office time reboot
Ruby in office time rebootRuby in office time reboot
Ruby in office time reboot
 
Metaprogramming with javascript
Metaprogramming with javascriptMetaprogramming with javascript
Metaprogramming with javascript
 
My month with Ruby
My month with RubyMy month with Ruby
My month with Ruby
 
Lisp in the Cloud
Lisp in the CloudLisp in the Cloud
Lisp in the Cloud
 
Rubykaigi 2017-nishimotz-v6
Rubykaigi 2017-nishimotz-v6Rubykaigi 2017-nishimotz-v6
Rubykaigi 2017-nishimotz-v6
 
About Clack
About ClackAbout Clack
About Clack
 
Actors, a Unifying Pattern for Scalable Concurrency | C4 2006
Actors, a Unifying Pattern for Scalable Concurrency | C4 2006 Actors, a Unifying Pattern for Scalable Concurrency | C4 2006
Actors, a Unifying Pattern for Scalable Concurrency | C4 2006
 
Ruby, the language of devops
Ruby, the language of devopsRuby, the language of devops
Ruby, the language of devops
 
Ruby projects of interest for DevOps
Ruby projects of interest for DevOpsRuby projects of interest for DevOps
Ruby projects of interest for DevOps
 
Clojure Conj 2014 - Paradigms of core.async - Julian Gamble
Clojure Conj 2014 - Paradigms of core.async - Julian GambleClojure Conj 2014 - Paradigms of core.async - Julian Gamble
Clojure Conj 2014 - Paradigms of core.async - Julian Gamble
 
Perl On The JVM (London.pm Talk 2009-04)
Perl On The JVM (London.pm Talk 2009-04)Perl On The JVM (London.pm Talk 2009-04)
Perl On The JVM (London.pm Talk 2009-04)
 
Applying the paradigms of core.async in Clojure and ClojureScript
Applying the paradigms of core.async in Clojure and ClojureScriptApplying the paradigms of core.async in Clojure and ClojureScript
Applying the paradigms of core.async in Clojure and ClojureScript
 
JRuby: The Hard Parts
JRuby: The Hard PartsJRuby: The Hard Parts
JRuby: The Hard Parts
 
Java Closures
Java ClosuresJava Closures
Java Closures
 

En vedette

"Go" Contra ou a favor? Já vale a pena investir nessa linguagem?
"Go" Contra ou a favor? Já vale a pena investir nessa linguagem?"Go" Contra ou a favor? Já vale a pena investir nessa linguagem?
"Go" Contra ou a favor? Já vale a pena investir nessa linguagem?José Yoshiriro
 
Go language presentation
Go language presentationGo language presentation
Go language presentationparamisoft
 
Celluloid, Celluloid::IO and Friends
Celluloid, Celluloid::IO and FriendsCelluloid, Celluloid::IO and Friends
Celluloid, Celluloid::IO and FriendsMarcelo Pinheiro
 
An introduction to go programming language
An introduction to go programming languageAn introduction to go programming language
An introduction to go programming languageTechnology Parser
 

En vedette (6)

Golang vs Ruby
Golang vs RubyGolang vs Ruby
Golang vs Ruby
 
"Go" Contra ou a favor? Já vale a pena investir nessa linguagem?
"Go" Contra ou a favor? Já vale a pena investir nessa linguagem?"Go" Contra ou a favor? Já vale a pena investir nessa linguagem?
"Go" Contra ou a favor? Já vale a pena investir nessa linguagem?
 
Go language presentation
Go language presentationGo language presentation
Go language presentation
 
Celluloid, Celluloid::IO and Friends
Celluloid, Celluloid::IO and FriendsCelluloid, Celluloid::IO and Friends
Celluloid, Celluloid::IO and Friends
 
Golang
GolangGolang
Golang
 
An introduction to go programming language
An introduction to go programming languageAn introduction to go programming language
An introduction to go programming language
 

Similaire à Ruby is dying. What languages are cool now?

Golang workshop - Mindbowser
Golang workshop - MindbowserGolang workshop - Mindbowser
Golang workshop - MindbowserMindbowser Inc
 
Sugar Presentation - YULHackers March 2009
Sugar Presentation - YULHackers March 2009Sugar Presentation - YULHackers March 2009
Sugar Presentation - YULHackers March 2009spierre
 
Peyton jones-2011-parallel haskell-the_future
Peyton jones-2011-parallel haskell-the_futurePeyton jones-2011-parallel haskell-the_future
Peyton jones-2011-parallel haskell-the_futureTakayuki Muranushi
 
Simon Peyton Jones: Managing parallelism
Simon Peyton Jones: Managing parallelismSimon Peyton Jones: Managing parallelism
Simon Peyton Jones: Managing parallelismSkills Matter
 
The Ring programming language version 1.5.2 book - Part 5 of 181
The Ring programming language version 1.5.2 book - Part 5 of 181The Ring programming language version 1.5.2 book - Part 5 of 181
The Ring programming language version 1.5.2 book - Part 5 of 181Mahmoud Samir Fayed
 
New c sharp4_features_part_vi
New c sharp4_features_part_viNew c sharp4_features_part_vi
New c sharp4_features_part_viNico Ludwig
 
2016 bioinformatics i_python_part_1_wim_vancriekinge
2016 bioinformatics i_python_part_1_wim_vancriekinge2016 bioinformatics i_python_part_1_wim_vancriekinge
2016 bioinformatics i_python_part_1_wim_vancriekingeProf. Wim Van Criekinge
 
The Ring programming language version 1.7 book - Part 6 of 196
The Ring programming language version 1.7 book - Part 6 of 196The Ring programming language version 1.7 book - Part 6 of 196
The Ring programming language version 1.7 book - Part 6 of 196Mahmoud Samir Fayed
 
Go After 4 Years in Production - QCon 2015
Go After 4 Years in Production - QCon 2015Go After 4 Years in Production - QCon 2015
Go After 4 Years in Production - QCon 2015Travis Reeder
 
The Ring programming language version 1.5.1 book - Part 4 of 180
The Ring programming language version 1.5.1 book - Part 4 of 180The Ring programming language version 1.5.1 book - Part 4 of 180
The Ring programming language version 1.5.1 book - Part 4 of 180Mahmoud Samir Fayed
 
IronRuby for the Rubyist
IronRuby for the RubyistIronRuby for the Rubyist
IronRuby for the RubyistWill Green
 
The Ring programming language version 1.9 book - Part 6 of 210
The Ring programming language version 1.9 book - Part 6 of 210The Ring programming language version 1.9 book - Part 6 of 210
The Ring programming language version 1.9 book - Part 6 of 210Mahmoud Samir Fayed
 
COMPUTER LANGUAGES AND THERE DIFFERENCE
COMPUTER LANGUAGES AND THERE DIFFERENCE COMPUTER LANGUAGES AND THERE DIFFERENCE
COMPUTER LANGUAGES AND THERE DIFFERENCE Pavan Kalyan
 
AddisDev Meetup ii: Golang and Flow-based Programming
AddisDev Meetup ii: Golang and Flow-based ProgrammingAddisDev Meetup ii: Golang and Flow-based Programming
AddisDev Meetup ii: Golang and Flow-based ProgrammingSamuel Lampa
 
Unit 4 Assignment 1 Comparative Study Of Programming...
Unit 4 Assignment 1 Comparative Study Of Programming...Unit 4 Assignment 1 Comparative Study Of Programming...
Unit 4 Assignment 1 Comparative Study Of Programming...Carmen Sanborn
 
Evolution or stagnation programming languages
Evolution or stagnation programming languagesEvolution or stagnation programming languages
Evolution or stagnation programming languagesDaniele Esposti
 

Similaire à Ruby is dying. What languages are cool now? (20)

Golang workshop - Mindbowser
Golang workshop - MindbowserGolang workshop - Mindbowser
Golang workshop - Mindbowser
 
Sugar Presentation - YULHackers March 2009
Sugar Presentation - YULHackers March 2009Sugar Presentation - YULHackers March 2009
Sugar Presentation - YULHackers March 2009
 
The Awesomeness of Go
The Awesomeness of GoThe Awesomeness of Go
The Awesomeness of Go
 
Peyton jones-2011-parallel haskell-the_future
Peyton jones-2011-parallel haskell-the_futurePeyton jones-2011-parallel haskell-the_future
Peyton jones-2011-parallel haskell-the_future
 
Simon Peyton Jones: Managing parallelism
Simon Peyton Jones: Managing parallelismSimon Peyton Jones: Managing parallelism
Simon Peyton Jones: Managing parallelism
 
The Ring programming language version 1.5.2 book - Part 5 of 181
The Ring programming language version 1.5.2 book - Part 5 of 181The Ring programming language version 1.5.2 book - Part 5 of 181
The Ring programming language version 1.5.2 book - Part 5 of 181
 
Evalution about programming language part 1
Evalution about programming language part 1Evalution about programming language part 1
Evalution about programming language part 1
 
P1 2017 python
P1 2017 pythonP1 2017 python
P1 2017 python
 
New c sharp4_features_part_vi
New c sharp4_features_part_viNew c sharp4_features_part_vi
New c sharp4_features_part_vi
 
2016 bioinformatics i_python_part_1_wim_vancriekinge
2016 bioinformatics i_python_part_1_wim_vancriekinge2016 bioinformatics i_python_part_1_wim_vancriekinge
2016 bioinformatics i_python_part_1_wim_vancriekinge
 
The Ring programming language version 1.7 book - Part 6 of 196
The Ring programming language version 1.7 book - Part 6 of 196The Ring programming language version 1.7 book - Part 6 of 196
The Ring programming language version 1.7 book - Part 6 of 196
 
Go After 4 Years in Production - QCon 2015
Go After 4 Years in Production - QCon 2015Go After 4 Years in Production - QCon 2015
Go After 4 Years in Production - QCon 2015
 
The Ring programming language version 1.5.1 book - Part 4 of 180
The Ring programming language version 1.5.1 book - Part 4 of 180The Ring programming language version 1.5.1 book - Part 4 of 180
The Ring programming language version 1.5.1 book - Part 4 of 180
 
IronRuby for the Rubyist
IronRuby for the RubyistIronRuby for the Rubyist
IronRuby for the Rubyist
 
The Ring programming language version 1.9 book - Part 6 of 210
The Ring programming language version 1.9 book - Part 6 of 210The Ring programming language version 1.9 book - Part 6 of 210
The Ring programming language version 1.9 book - Part 6 of 210
 
cadec-2017-golang
cadec-2017-golangcadec-2017-golang
cadec-2017-golang
 
COMPUTER LANGUAGES AND THERE DIFFERENCE
COMPUTER LANGUAGES AND THERE DIFFERENCE COMPUTER LANGUAGES AND THERE DIFFERENCE
COMPUTER LANGUAGES AND THERE DIFFERENCE
 
AddisDev Meetup ii: Golang and Flow-based Programming
AddisDev Meetup ii: Golang and Flow-based ProgrammingAddisDev Meetup ii: Golang and Flow-based Programming
AddisDev Meetup ii: Golang and Flow-based Programming
 
Unit 4 Assignment 1 Comparative Study Of Programming...
Unit 4 Assignment 1 Comparative Study Of Programming...Unit 4 Assignment 1 Comparative Study Of Programming...
Unit 4 Assignment 1 Comparative Study Of Programming...
 
Evolution or stagnation programming languages
Evolution or stagnation programming languagesEvolution or stagnation programming languages
Evolution or stagnation programming languages
 

Dernier

Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareJim McKeeth
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfonteinmasabamasaba
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...masabamasaba
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...Shane Coughlan
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benonimasabamasaba
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastPapp Krisztián
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfonteinmasabamasaba
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrandmasabamasaba
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park masabamasaba
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyviewmasabamasaba
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Hararemasabamasaba
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park masabamasaba
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 

Dernier (20)

Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 

Ruby is dying. What languages are cool now?

  • 1. Ruby is dying What languages are cool now? Michał Konarski u2i.com
  • 4. But let’s look from a different angle...
  • 6. Well, not exactly. But what languages are cool now?
  • 7. Let’s look at six of them
  • 9. Swift ● designed by Apple ● released in 2014 ● created for iOS, macOS, tvOS ● multi-paradigm ● statically, strongly typed ● compiled
  • 10. namespacesgenerics closures tuples operator overloading native collections type inference pattern matching multiple return types Read-Eval-Print-Loop (REPL) Swift features
  • 11. Nothing really outstanding. So, what’s the story behind Swift?
  • 12. “We absolutely loved Objective-C, but we had to ask ourselves a question - what would it be like if we had Objective-C without the baggage of C?” Tim Cook
  • 13. It’s mainly because Objective-C is bad. And they had nothing else.
  • 14. @interface Foo : NSObject @property (readonly) int bar; - (instancetype)initWithBar:(int)bar; + (instancetype)fooWithBar:(int)bar; @end @implementation Foo - (instancetype)initWithBar:(int)bar { self = [super init]; if (self) { _bar = bar; } return self; } + (instancetype)fooWithBar:(int)bar { return [[self alloc] initWithBar:bar]; } @end How bad is Objective-C? http://www.antonzherdev.com/post/70064588471/top-13-worst-things-about-objective-c
  • 15. Swift is easier to read Objective-C if (myDelegate != nil) { if ([myDelegate respondsToSelector: @selector(scrollViewDidScroll:)]) { [myDelegate scrollViewDidScroll:myScrollView] } } Swift myDelegate?.scrollViewDidScroll?(myScrollView)
  • 16. Why also Swift is better? ● no need to have two separate files (code and headers) ● it’s safer (runtime crash on null pointer) ● it has automatic ARC (Automatic Reference Counting) ● it’s faster ● it requires less code ● it has namespaces
  • 17. It’s not only a language XCode 8 https://developer.apple.com/xcode/
  • 18. It’s not only a language Swift Playgrounds http://www.apple.com/swift/playgrounds/
  • 19.
  • 20. ● sponsored by Mozilla ● announced in 2010 ● first release in 2012 ● stable release in 2015 ● statically, strongly typed ● multi-paradigm ● compiled
  • 21. “The goal of the project is to design and implement a safe, concurrent, practical systems language” Rust FAQ
  • 22. There are not such languages? Apparently not.
  • 23. Current languages are wrong ● there is too little attention paid to safety ● they have poor concurrency support ● they offer limited control over resources ● they stick too much to paradigm
  • 24. So let’s create a new high-low level language!
  • 25. Rust is a high level language! ● generics ● traits ● pattern matching ● closures ● type inference ● automatic memory allocation and deallocation ● guaranteed memory safety ● threads without data races
  • 26. Rust is a low level language! ● no garbage collector ● manual memory management ● zero-cost abstractions ● minimal runtime ● as fast as C/C++
  • 28. Ownership fn foo() { let v1 = vec![1, 2, 3]; let v2 = v1; println!("v1[0] is: {}", v1[0]); } error: use of moved value: `v
  • 29. You can’t have two references to the same object!
  • 31. There are more such mechanisms.
  • 32. Future of Rust ● currently two big projects: servo and rust ● other smaller projects: redox, cgmath, Iron, rust-doom ● it changes very quickly ● it has a good opinion in the community ● it will be hard to replace C/C++ ● It has a steep learning curve
  • 33. Go
  • 34. Go ● designed in Google in 2007 ● first release in 2009 ● stable release in 2016 ● statically, strongly typed ● multi-paradigm, concurrent ● compiled
  • 35. Standard languages (Java, C++) ● are very strong: type-safe, effective, efficient ● great in hands of experts ● used to build huge systems and companies
  • 36. Standard languages (Java, C++) ● hard to use ● compilers are slow ● binaries are huge ● desperately need language-aware tools ● poorly adapt to clouds, multicore CPUs
  • 37. Simpler languages (Python, Ruby, JS) ● easier to learn ● dynamically typed (fewer keystrokes) ● interpreted (no compiler to wait for) ● good tools (interpreters make things easier)
  • 38. Simpler languages (Python, Ruby, JS) ● slow ● not type-safe ● hard to maintain in a big project ● very poor at scale ● not very modern
  • 39. What if we had a static language with dynamic-like syntax?
  • 40. A niche for a language ● understandable ● statically typed ● productive and readable ● fast to work in ● scales well ● doesn't require tools, but supports them well ● good at networking and multiprocessing
  • 41. Features of Go ● syntax typical for dynamic languages ● type inference ● fast compilation ● garbage collector ● memory safety features ● built-in concurrency ● object oriented without classes and inheritance ● lack of generics ● compiles to small statically linked binaries
  • 42. Interfaces type Animal interface { Speak() string } type Dog struct { } func (d Dog) Speak() string { return "Woof!" } func SaySomething(a Animal) { fmt.Println(a.Speak()) } func main() { dog := Dog{} SaySomething(dog) }
  • 44. Goroutines func main() { go expensiveComputation(x, y, z) anotherExpensiveComputation(a, b, c) }
  • 45. Channels func main() { ch := make(chan int) go expensiveComputation(x, y, z, ch) v2 := anotherExpensiveComputation(a, b, c) v1 := <- ch fmt.Println(v1, v2) }
  • 46. Future of Go ● it’s popularity constantly raises ● it’s backed by Google ● it’s used by Docker, Netflix, Dropbox, CloudFare, SoundCloud, BBC, New York Times, Uber and others ● it’s seen as a good balance between Java-like languages and Python-like ● it easy to learn and powerful ● it runs well in cloud environments ● might be a good choice for microservices approach
  • 47.
  • 48. ● created by José Valim ● released in 2012 ● functional ● dynamically, strongly typed ● compiled to Erlang VM byte code
  • 50. Elixir = Erlang with Ruby syntax
  • 51. Elixir features ● massively concurrent ● scalable ● fault-tolerant ● great performance ● functional, but practical ● nice Ruby-like syntax ● metaprogramming via macros
  • 54. Controllers in Rails class PagesController < ApplicationController def index @title = params[:title] @members = [ {name: "Chris McCord"}, {name: "Matt Sears"}, {name: "David Stump"}, {name: "Ricardo Thompson"} ] render "index" end end http://www.littlelines.com/blog/2014/07/08/elixir-vs-ruby-showdown-phoenix-vs-rails/
  • 55. Controllers in Phoenix defmodule Benchmarker.Controllers.Pages do use Phoenix.Controller def index(conn, %{"title" => title}) do render conn, "index", title: title, members: [ %{name: "Chris McCord"}, %{name: "Matt Sears"}, %{name: "David Stump"}, %{name: "Ricardo Thompson"} ] end end http://www.littlelines.com/blog/2014/07/08/elixir-vs-ruby-showdown-phoenix-vs-rails/
  • 56. Future of Elixir ● new Erlang for the masses ● fits highly concurrent niche ● attracts Ruby developers ● no big company behind ● used by Pinterest ● will fly on the wings of Phoenix?
  • 57.
  • 58. ● created by data scientists ● released in 2012 ● dynamically, strongly typed ● compiled
  • 59. Compiled one for fast stuff. Interpreted one for visualisation. Data scientists’ two languages problem:
  • 60. Julia features ● solves scientists’ two language problem ● familiar syntax ● extensive scientific library ● user-defined types ● multiple dispatch ● built-in parallelism ● good performance (comparing to C)
  • 61. Single dispatch (Ruby) a.do_something(b, c) Only a decides which method to choose.
  • 62. Multiple dispatch julia> f(x::Float64, y::Float64) = 2x + y; julia> f(2.0, 3.0) 7.0 julia> f(2.0, 3) ERROR: MethodError: `f` has no method matching Here everything decides!
  • 63. Future of Julia ● R, MATLAB and C competitor ● unifies scientific software stack ● not mature enough yet ● small, but growing number of libraries
  • 64.
  • 65. ● created by Google ● released in 2011 ● optionally typed ● interpreted ● translated to JavaScript
  • 67. Dart vs JavaScript ● class-based (not prototype-based) ● normal foreach ● named parameters ● operator overriding ● string interpolation ● optional typing ● false is false ● easy DOM operations
  • 68. Looks familiar class Point { num x; num y; Point(this.x, this.y); distanceFromOrigin() { return sqrt(x * x + y * y); } } main() { var p = new Point(2, 3); print(p.distanceFromOrigin()); }
  • 69. Cascade operator querySelector('#button') ..text = 'Confirm' ..classes.add('important') ..onClick.listen( (e) => window.alert('Confirmed!'));
  • 70. Future of Dart ● 2016 AdWord UI built in Dart ● no Dart VM in browsers ● fragmented community ● client-side future is dim ● backend future looks much better
  • 71.
  • 72. Sources ● developer.apple.com/swift ● rust-lang.org ● golang.org ● elixir-lang.org ● julialang.org ● dartlang.org