c++.stlsoft - STLSoft on C
- Dave (24/24) Mar 20 2008 I downloaded STLSoft 1.9.27 and have been perusing some of the
- Matthew Wilson (19/46) Mar 20 2008 There are: control, compilation speed, compatiblity, and (dare I say it)...
- Dave (16/35) Mar 21 2008 news:frudsp$g2u$1@digitalmars.com...
- Matthew Wilson (4/10) Mar 21 2008 Sure. I'd like to take a look.
I downloaded STLSoft 1.9.27 and have been perusing some of the code. I quickly found the following: /* Template support */ #if defined(__cplusplus) && \ !defined(STLSOFT_CF_TEMPLATE_SUPPORT) template-based and require this support. #endif /* STLSOFT_CF_TEMPLATE_SUPPORT */ I also saw something elsewhere that made me think STLSoft was for C as well as C++. Am I seeing this correctly? Is there ANY part of STLSoft that will work under C? I vascilate between trying to stay strictly within C (I feel there are some really good reasons) and wandering out into the C++ world. Recently I was putting together some general purpose C libraries (exceptions, strings, indices, etc.) when I found your product. Can I use parts of STLSoft within my C code? I've resisted C++ in a large part because of the "fully committed, all or nothing, no going back" approach one has to take when adopting a C++ slant to a project (plus some things highlighted at http://yosefk.com/c++fqa/defective.html). If not STLSoft, do you by chance know of a good general purpose C library with similar functionality? Thanks.
Mar 20 2008
"Dave" <annonymous notsure.org> wrote in message news:frudsp$g2u$1 digitalmars.com...I downloaded STLSoft 1.9.27 and have been perusing some of the code. I quickly found the following: /* Template support */ #if defined(__cplusplus) && \ !defined(STLSOFT_CF_TEMPLATE_SUPPORT) template-based and require this support. #endif /* STLSOFT_CF_TEMPLATE_SUPPORT */ I also saw something elsewhere that made me think STLSoft was for C as well as C++. Am I seeing this correctly? Is there ANY part of STLSoft that will work under C?Yes, several parts of STLSoft are C-compatibleI vascilate between trying to stay strictly within C (I feel there are some really good reasons)There are: control, compilation speed, compatiblity, and (dare I say it) discipline (!) Several of my libraries (open-source and commercial) are written in C, and use a subset of STLSoft for compiler/language-discrimination, simple utility functions, and so on. For example, many of the util/front-end/back-end components in Pantheios (http://pantheios.org/) are written in C. It's quite amusing to watch the compilation on my 64-bit Linux box: all you get to see are the C++ compilation units, because the C ones fly by too fast to observe. ;-)and wandering out into the C++ world. Recently I was putting together some general purpose C libraries (exceptions, strings, indices, etc.)I'm interested. In fact, I was only pondering about doing the same thing - like I'd ever find the time! - recently. I'd be keen to have a look. Do you have a link?when I found your product.May I ask where?Can I use parts of STLSoft within my C code?Yes indeed. Anything ending in .h should be C/C++ compatible, whereas those ending in .hpp are C++ only.I've resisted C++ in a large part because of the "fully committed, all or nothing, no going back" approach one has to take when adopting a C++ slant to a project (plus some things highlighted at http://yosefk.com/c++fqa/defective.html).He he. My next book, Breaking Up The Monolith (http://breakingupthemonolith.com/), examines the supposed necessary tradeoffs between discoverability, safety, extensibility, portability and efficiency that the C++ community has seen fit to accept, and throws out many of these. As is speed, demonstrated in Pantheios, and soon will be with FastFormat, you can have simplicity, safety, extensibility and ridiculously high performance without sacrificing discoverability. (Anyway, that's my story. =P)If not STLSoft, do you by chance know of a good general purpose C library with similar functionality?Nope. But I'd be interested to see yours, or any that you might come across. Cheers Matt
Mar 20 2008
== Quote from Matthew Wilson (matthew hat.stlsoft.dot.org)'s article"Dave" <annonymous notsure.org> wrote in messagenews:frudsp$g2u$1 digitalmars.com...Am I seeing this correctly? Is there ANY part of STLSoft that will work under C?Yes, several parts of STLSoft are C-compatiblesame thing - like I'd ever find the time! - recently. I'd be keen toRecently I was putting together some general purpose C libraries (exceptions, strings, indices, etc.)I'm interested. In fact, I was only pondering about doing thehave a look. Do you have a link?I don't. I doubt my libraries are really production quality (although I use them, and they work), plus I make regular changes to them, and because I control them, I just don't worry about breaking anyone else's code -- yet. I could e-mail you some subset that is pretty stable if you're interested.I'm a Digital Mars customer; I just haven't looked thru everything yet; especially if it had "STL" in the name. Until recently, I just haven't been interested.when I found your product.May I ask where?whereas those ending in .hpp are C++ only.Can I use parts of STLSoft within my C code?Yes indeed. Anything ending in .h should be C/C++ compatible,purpose CIf not STLSoft, do you by chance know of a good generalcome across.library with similar functionality?Nope. But I'd be interested to see yours, or any that you mightCheers Matt
Mar 21 2008
Sure. I'd like to take a look. m a t t h e w s y n e s i s <dot> c o m <dot> a u Cheers MattDo you have a link?I don't. I doubt my libraries are really production quality (although I use them, and they work), plus I make regular changes to them, and because I control them, I just don't worry about breaking anyone else's code -- yet. I could e-mail you some subset that is pretty stable if you're interested.
Mar 21 2008