Evolution
or
Stagnation
of
Programming languages
Daniele Esposti
Data Platform Lead
Daily playing with:
Python, JavaScript & Java
@expobrain
github.com/expobrain
Daniele Esposti
I’ll not talking about the history of
programming languages...
I’ll talk about
modern programming languages
What’s a language?
“The method of communication,
either spoken or written,
consisting of the use of words
in a structured and conventional way”
https://en.oxforddictionaries.com/definition/language
Does it apply
to programming languages as well?
Yes!
Languages evolves
by the requirements
of whom spoke them
If a language is not useful anymore
or become stagnant
fewer and fewer people will use it
Let consider two very popular
programming languages
Python
JavaScript
&
Python 3.x
Python
● print() as a function
● All strings are unicode
● Renaming of standard libs (six.moves helps)
● Type annotations
Python
● true division with integers
● async / await
● f-strings
● Delegating to a Subgenerator ( yield from )
Python
● very few additions in the 2.x series
● core language is still the same
● changes in the 3.x series
are mostly backward incompatible
Python
However some features are
backward compatible,
must be activated with:
from __future__ import <feature>
Python
However a huge amount of improvements:
new packages, better performance
and lower memory usage
JavaScript ES5 & ES6
JavaScript
● Setter / getters
● New methods on Object and Array
● const / let
● Block scoped variables and functions
JavaScript
● Arrow functions
● Lexical this
● Default parameters in functions
● Spread / rest operator
JavaScript
● Template literals
● Property shorthand
● Computed property names
● Method properties in objects
JavaScript
Destructuring:
● Array matching
● Object matching
● ...with default values and deep traversal
JavaScript
● import and export
● Classes
● Iterators and generators
● Map / Set and WeakMap / WeakSet
JavaScript
● Typed and shared arrays
● Promise and async / await
● Proxying and reflection
● Collation
JavaScript
A lot of new addition to the language
No backward incompatible changes*
Code can be run on any browser*
*more on this later
Compared to Python JavaScript’s
evolution in the same timescale
has been more successful
What happened?
From Guido van Rossum: BDFL Python 3 retrospective:
● We didn't build any runtime compatibility features
● We didn't know how to create fully-automated
conversion tools
● We didn't make enough compatibility allowances
● We did a few things half-heartedly (i.e. the stdlib cleanup)
Python
JavaScript
● The TC39 committee is careful to not break the Web
● ES5 code is still valid in ES6, ES7, etc.
● Features are provided by polyfills
● Babel transpile any version of JavaScript down to ES5
Which means:
● Old code is still working
● New code works on older interpreters via transpiling
● Can mix new and old code
● Can write code in ES.next via transpiling
JavaScript
Lessons learned:
Developers are more productive when
upgrading the programming language
is painless and seamless
Tooling is important:
2to3 failed
where
Babel succeeded
Old and new language
must coexist
Explore how other languages
approached the same problem
The language should be ergonomic
end evolve fast to be close
to the developer’s needs
Python
is one of the most successful language
but it’s evolution is restrained
We don’t want to see it stagnant
We want so see it thrive!
github.com/expobrain@expobrain
Thank you !

Daniele Esposti - Evolution or stagnation programming languages - Codemotion Berlin 2018