Site Archive (Complete)
C++
void main(void)

Calls, Returns and In-Between.

by Kevin Carlson

May 2007


May 29, 2007

Follow the Rules


The flexibility of a rule-based system is one reason it has been such a popular choice in the AI field for so long. You don't need to perfectly understand the system you are modeling ahead of time. You can write your program, but later change the knowledge on which the rules operate without redesigning the whole system. There are some very specialized expert systems designed for writing just these kinds of programs, but sometimes, you just want some good 'ol, plain-vanilla C-style capabilities built in to your rule-based program. In this case, an approach like that presented by Lynwood Wilson in "Rule-Based Programming in C" might be just the ticket.

Posted by Kevin Carlson at 02:08 PM  Permalink |


May 22, 2007

CLI Cleanup Complexities


Object cleanup is one place where C++/CLI requires considering a bit more than is necessary with standard C++. Standard C++ achieves object cleanup with a destructor, but CLI uses a finalizer. In the C++/CLI world, it pays to know how both of these facilites work, and when to use them. Rex Jaeschke continues a long-running series of articles on C++/CLI with his latest, this time on Destructors and Finalizers.

Posted by Kevin Carlson at 02:21 PM  Permalink |


May 08, 2007

Thread-safe Singletons


Vladimir Kliatchko found recently that there wasn't a universal solution for the thread-safe initialization and destruction of Singletons. A C++ file-scope variable for initialization wouldn't work, and the pattern he turned to, the Meyers Singleton (in which the Singleton is intialized upon first use) didn't really solve the thread safety issue. Here's what Vladimir came up with as a solution.

Posted by Kevin Carlson at 01:26 PM  Permalink |



November 2007
Sun Mon Tue Wed Thu Fri Sat
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30  


BLOGROLL
 
INFO-LINK


Related Sites: DotNetJunkies, SD Expo, SqlJunkies