Reason - cross-platform C ++ framework

Published on April 02, 2009

Reason - cross-platform C ++ framework

    I'll start with a description of the problem. When writing C ++ applications, some difficulties for novice developers may be the lack of standard classes for working with strings, files, collections, a network, and other simple operations. Of course, there are WinAPI, Standard Library, CRT, MFC, ATL, but they are quite difficult to use.

    For example, in serious commercial projects, reading files using direct calls to the WinAPI function CreateFile / ReadFile / CloseFile without creating class wrappers is difficult, and generally wrong. Another example, working with strings, CRT is inconvenient: buffers, insecure code. std :: string - quite incomplete: there are no such commonly used operations as trim, split. Therefore, many developers in each new project write their own classes / wrappers to perform simple operations.



    Reason is a cross-platform library of C ++ classes that provides convenient tools for working with many objects needed in almost any project:

    • Strings
    • Files / Folders
    • Smart pointers
    • Collectons: Array, List, Map, HashTable, Tree, Set, Stack
    • XML / XPath
    • Regular Expressions
    • Threads
    • Events, Delegates
    • Sql


    I didn’t mention all, the rest of the features can be seen on the developer's page and looked at the source code. All classes are conveniently grouped by namespace. There is no documentation for the library, but the library classes are well designed and have a very convenient interface, so it seems to me that problems with its use should not arise. Free for non-commercial use (GNU GPL), for use in commercial projects you need to obtain a commercial license.

    Well, my personal impressions: I liked how the code was written, I am close to the programming approach used by the author. Already spied on him an interesting template method for implementing delegates / events, I would probably think for a long time.

    The Reason author’s thought was also impressive:
    "When a lot of developers talk about why one language is better than another, they are really comparing frameworks. "The language defines the syntax and the compiler, but it is the frameworks which make a language mainstream."