C++

Developer Day - Boulder 2009

This past Saturday I attended the Developer Day meeting in Boulder, CO. Overall the day was beneficial and interesting even tho it was more dynamic languages centric and very few things applied directly to my C++ development.

I did present ChaiScript during a lightning talk. I'm not sure if I said anything coherent or not but a couple of people chatted with me about it afterward, so I guess it wasn't horrible.

Nobody Understands C++: Part 9: Error Handling

I was recently at a talk where the speaker was discussing the history of C++. He argued that one problem with C++ was that its design requirements included backward compatibility with C code, and one fallout of this was the requirement to support all previous types of error handling as well as adding exceptions. That is, C++ supports:

  1. Returning of error codes.
  2. Error handling functions.
  3. Exception handling.

It is true that C++ supports all 3 of these mechanisms, as well as some other cruft left behind from C that unnecessarily encumbers the language. The speaker's point on this one particular case, however, is lost to the fact that every language supports the first two.

Nobody Understands C++: Part 8: Operator Overloading

There has been much discussion over the years about the usefulness of operator overloading in C++ as well as the ability to get it right.

In reality, it's hard to get it wrong as long as you follow the canonical forms of the operators and don't do unexpected things like overloade the + operator to perform a subtraction operation. Also, the types that your overloaded operators work with should be consistent.

Understanding the ChaiScript clone Function

In ChaiScript variable assignments create a copy of the object being assigned.

var x = 5;
var y = x; // Make a copy of x and assign it to y

It's an interesting study in how the ChaiScript language works to dissect this ability to clone an object dynamically. The basic premise is that the function creates and executes a dynamic function call to the object's copy constructor.

ChaiDraw: Programming Toy and Chaiscript Use Case

ChaiDraw ScreenshotChaiDraw ScreenshotI have been working for the past few weeks on ChaiDraw. ChaiDraw is an application that's both meant as an educational toy and as a showcase for how to effectively use ChaiScript in your application. It turns out it's actually a fun little toy to play with. Check it out if you have an interest in programming toys or especially if you have an interest in ChaiScript.

ChaiScript: Easy C++ Scripting

Jon and I released the first release of ChaiScript earlier today. ChaiScript is designed to make it trivially easy to use scripting in your C++ application and to expose your C++ to the scripting system.

ChaiScript is a header only implementation. It requires no external libraries and is distributed under the BSD license, making it free and easy to distribute.

So, how easy is easy, really? How does 3 lines of code sound for a classic hello world example?

#include <iostream> 

Syndicate content