On 30/04/2012, at 8:38 AM, Jeff Schultz wrote: > On Fri, Apr 27, 2012 at 02:50:15PM +1000, john skaller wrote: >> We should note here: Felix provides two kinds of platform independence. >> Some things are done by C++ conditional compilation or link time >> library selection. This means the generated C++ is portable to all >> platforms. > >> With the mechanism above, however, the Felix code is portable to >> all platforms, but the C++ code is not. > >> We might recover C++ source portability with plugins, i.e. at the link stage, >> in a similar way that C++ is rendered portable by a standard API to the >> non-portable implementation of C/C++ libraries. > > This may well be the best way to do it, but, without the plugin part, > it may affect test strategies negatively. If Felix code is compiled > to platform-dependent C++, with OS interfacing mixed in, then I must > compile and test fully on all platforms. I must do this even during > development, or risk last minute problems during release > qualification. If Felix code is compiled to platform-independent C++ > and linked with OS-dependent interfacing classes, and these are well > and independently tested to conform to their specifications, then I > may be able to test once with some confidence. We do that all the > time with Java---it's the main reason for using it. (They got the > slogan wrong. It's really TORA, not WORA that matters.) > > Or maybe I don't understand the arrangement properly?
So Jeff, you're saying you'd trust separate C/C++ libraries for each platform more than separate Felix libraries? And/or it would make testing easier if the C++ library setup encapsulated the differences because then the C++ generated by Felix would be platform independent? in the latter you have to test: (P) Each C++ library on each platform (K) The Felix programs, on One platform. (or perhaps 2). So that's P + K tests (P=#platforms, K=#programs). Whereas with Felix generating different code for each platform, you have to test P * K distinct pieces of C++. So at the C++ level, you'd be better testing P + K times than P*K. Of course at the Felix level, you're testing P + K times in either case. The way forward here is probably: (1) Use Felix libraries for each platform (2) Generate C++ libraries from the Felix ones to have your cake and eat it too: write the code in Felix, but generate C++ libraries first, then link to them from Felix programs. Plugins allow that right now BUT only with dynamic linkage. Plugins doen't work with static linkage because you're searching for symbols by a string name at run time. However, separate compilation, including static linkage, is coming. I just solve the key problem of making unique C++ symbol names for tuples, variants, etc etc so you will be able to export Felix functions as C++. (Note: some functions are actually C++ classes with methods .. so the unique names are mandatory). -- john skaller skal...@users.sourceforge.net http://felix-lang.org ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Felix-language mailing list Felix-language@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/felix-language