2018-04-10

To be fair with Haskell

Fairy Tales

In Java 8, functional style and efficiency I have shown how bad Haskell performs at the silly task I was using as test.

But there's a detail which makes the test unfair: the problem with the given code is that the factorial function I've written isn't tail recursive.

Eat the apple

Apple

Reading Why you should totally switch to Kotlin

Kotlin logo

I don't believe in titles like Why you should totally switch to Kotlin or Ten Reasons Why I Don't Like Golang (subtitle: why “I wouldn’t use it for a new project”), but being curious about languages, I always like to read this kind of articles, and eventually criticise them — though I neither advocate for nor oppose to any language in particular.

So…

2018-04-09

Exceptions to control the flow

Tracking-data flow chart

Using exceptions to control the flow of your program is an anti-pattern. Don't take too seriously whoever believes in exceptions as an indispensable feature of a language. Better no exception than misused exceptions!

2018-04-08

Java 8, functional style and efficiency

Java 8, released in 2014, introduced lambdas and the possibility to write code in a functional style through streams of elements. C++11 standard was published in 2011, and it introduced lambdas too, which altogether with old and new functions in algorithm (e.g. accumulate(), for_each(), count(), transform()) allow for a functional style in C++.