Sunday 03 December 2017
Thursday 30 November 2017
Being a haskell library provider means you have a contract toward your user: you provide them with a minimum degree of confidence your code work.
This is quite important. And thankfully Haskell maintainers are quite good with that. The language provides the abstraction to avoid the common mistakes; the semantic is checked at compile time. But what about the implementation itself? Or the properties? Is it correct? Is your functor actually a functor? Will it behave like everyone is expecting? Is your JSON parser parsing the data as expected?Continue Reading
Wednesday 15 March 2017
Wednesday 29 June 2016
In a previous post I demonstrated how handy error handling in Haskell and in Rust is.
It is possible to do the same in C++.
Too often I come along the problem of error handling in C++. Some believe
we must use
exceptions, others prefer the old C style error code.
I believe both are good options and have valid concerns about the other. I believe we should do both.Continue Reading
Saturday 11 June 2016
I have been a C++ developer for a little while, I have seen different methods to provide meaningful API:
The difficulties are to:
That's it: exceptions are for exceptional situations. And again, it is not easy to provide up to date documentation of the kind of exceptions your function may throw.
So, let's try something else. Let's see what other languages have done to try to solve the issue of non self documented APIs.Continue Reading