My talk from Functional Vilnius MeetUp #6.
http://www.functionalvilnius.lt/posts/2015-10-03-6th-meetup-announcement.html
Golang is becoming more and more popular. Most likely many of you have heard of its upgraded garbage collector and possibilities to work with lightweight threads – goroutines. Obviously, Golang is quite a good choice for server-side software oriented on a huge load. As Scala backend developer, I am a big fan of functional programming and actor model. Golang seems very promising, but from the first glance, its a totally imperative language. In my speech I’m going to tell about my experiments with Golang and attempt to use it as a functional language.
25. Wikipedia:
“Functional
programming is
a programming
paradigm
— a
style
of
building
the
structure
and
elements
of
computer
programs
— that
treats computation as
the
evaluation
of mathematical
functions and
avoids
changing-‐state and mutable data.”
26. What
it
means?
No
mutable
data
(no
side
effect)
No
mutable
state
(no
implicit,
hidden
state)
Same
result
returned
by
functions
called
with
the
same
inputs
Functions
are
pure
functions
in
the
mathematical
sense
30. Referential
transparency
With
no
shared
data,
concurrencygets
a
lot
simpler:
No
semaphores
No
monitors
No
locks
No
race-‐conditions
No
dead-‐locks