Error handling, a contentious and oft-discussed topic. Each language has some way of dealing with errors, be it error codes, result types, exceptions, something entirely different, or a mix. How to properly deal with things going wrong in our programs has been important pretty much ever since we started writing programs. Papers have been written about it, talks have been held on the topic, and countless libraries have been written to bring one languages way…
This is a question that has come up time and time again in the IRC channel, when talking to people in person, and in the comment section pretty much every time Nim has an article on Hackernews or one of the bigger programming subreddits. It’s also a question that has been answered a lot of times, both with a short and efficient “no”, but also in longer form. This article will go into some detail…
One feature in Nim that it shares with several other languages, especially functional ones, is implicit return of values. This is one of those small features that might just seem like a way to avoid writing return
everywhere. But in fact it can be used for much more than that! So what is implicit return? In Nim we have three ways to return a value from a procedure, you have the explicit way with return
,…
I recently had a look at a functional language named Toccata which amongst other things does away with booleans. While this migth seem utterly insane it's not an entirely new concept and proponents of such ideas will warn you of the perils of boolean blindness. This refers to the fact that booleans themselves carry no information apart from their value. But as others have pointed out this is true of all values and the linked article instead refers…