Tag: languages

  • Diversion ahead

    I’m not going to be able to spend as much time on the blog for a bit. Rather than struggle to keep up with the schedule I’m going to drop the schedule for now. I hope to still post occasionally but it won’t be every Tuesday and will be less often. It could mean that…

  • Defer again

    I written about defer before. This is a keyword that delays execution of a statement until the end of the block. It’s designed to allow you to perform setup and immediately specify the associated clean up. I thought it made control flow a bit more confusing but could be a useful tool. Simple implementation C++…

  • Error handling

    I’ve used a few different error handling techniques since university. Over the last few years a couple of other options have appeared. Lets take a simple problem and see how it works with all of them. A simple problem Let’s say we want to read a text file containing a list of dates and return…

  • Calling functions

    I was recently talking about clang-tidy. One of the performance checks it can run is unnecessary-value-param. This makes sense, accidentally passing a big array by value rather than by reference can invisibly ruin the code performance. The rule was pretty easy though, pass simple types by value and everything else by reference. Then along came…

  • In what order

    I came across the Odin language recently. I’ve not done any detailed research yet but I came across a new keyword and it got me thinking. defer The defer keyword goes in front of any statement and delays the execution of that statement until the end of the current scope. A possible use case is…

  • Rust

    I heard about Rust’s unusual approach to memory management and thought have a look. Programming Rust from O’Reilly is chunky at about 700 pages and has taken a while to get through but does seem to cover all the bases. I’ve not gone as far as coding in this language so this will just be…