One of the deepest mysteries in the functional programming world is the Y-Combinator. Many have heard of it, but few have mastered its mysteries. Although fairly useless in real world software, understanding how the Y-Combinator works and why it is important gives the student an important insight into the nature of functional programming.
Join with us on this journey of understanding. Be prepared to curry your functions and bind your lambdas as we delve into the whys and wherefores of this paragon of functional programming. Although you will probably never have a need for the combinator, the effort put forth to understand it will improve your functional programming chops. This talk is not for the faint of heart, but the successful student will be richly rewarded.
Also, you will understand why "Y-Combinator" is the perfect name for Paul Graham's start-up funding company.
So you consider yourself an Object Oriented developer? Ruby isn't limited to an OO style! See what functional programming can do for us, without learning any new language. These six principles of functional style apply in OO code. Some of these principles you already use; some express patterns old and new; all give us different ways of thinking about problems. Developers without expertise in functional programming will find new techniques for thinking and coding in Ruby.
Do you have to look at Rails models with 2500 lines of code? Or 200 line methods loaded with iterators, conditionals and instance variables? Not only you, even the code author does not understand what's going on in there.
I'll show you how you can craft simple and beautiful Rails application by adopting functional programming inspired ideas. Say goodbye to the mess you have by constructing tiny classes and functions that you can use to build up a complex system.
In OO, assignment is one of our main tools. Most developers learn how to store values in variables shortly after learning “Hello World”. By contrast, functional programming makes much less use of assignment and mutation. Instead techniques like function composition, recursion, and anonymous functions are used to produce the same results that OO programmers produce with side effects.
Despite being object oriented, Ruby easily accommodates pure functional approaches. This talk will demonstrate how common programming tasks can be accomplished without assignment or mutation. Ruby and Scheme (a Lisp dialect) will be used for examples. I’ll also discuss some of the great resources available for those interested in digging deeper into functional programming.
Elixir is one modern language that is introducing many Rubyists to the world of highly scalable, highly distributed, functional programming-based programming. In a more narrow scope, one language feature that many people liked is the now famous Pipe Operator "|>". There is nothing like this in Ruby. But could there be such an operator? And if it could be done, would it be useful? I started a pet project called "Chainable Methods" to address just that.