Railway-oriented programming in Java


Details
***This is a placeholder for the event being run on Eventbrite. Please sign up with your full name at https://www.eventbrite.co.uk/e/railway-oriented-programming-in-java-tickets-156215245003?aff=meetup ***
As developers, we have a tendency to focus on what our code is supposed to do, the happy path. Unfortunately, the real world is rarely that simple. Our code fails: it fails frequently, in many different ways. Code that is simple when expressing the happy path very quickly becomes complex and cumbersome when expressing the reality of the situation.
One approach to this rising complexity that has proven attractive in functional languages is railway-oriented programming: a way of representing two parallel paths through the code, one for success and one for failure. I'll be discussing a way to do this in Java, why it's desirable over more traditional approaches, and how it solves some Java-specific issues like exception-handling when using Streams.
Once you have this concept of railway-oriented programming, you start to see common patterns of failure that crop up time and again. I call these failure patterns, and taking a functional approach to Java makes it much easier to abstract over these, creating reusable solutions. I'll talk through a couple of examples, showing how you can easily build good DSLs that are highly specific to the use case, while still integrating well with basic constructs.
About speaker
Tom Johnson is a Java developer, unsure whether he's more invested in advocating XP or functional programming. Having previously worked at LMAX Exchange, Unruly, and Two Sigma, he's now a senior developer at TransFICC.
This event is organised by RecWorks on behalf of the London Java Community.
You can see our latest jobs here: https://recworks.co.uk/java-developer-jobs-london/.
You can see our privacy policy here: http://recworks.co.uk/privacy-policy
Continue the conversation at our Slack Group: https://londonjavacommunity.slack.com
Sign up here if you're not a member: https://bcrw.typeform.com/to/IIyQxd

Railway-oriented programming in Java