Slashdot Mirror


User: domKing

domKing's activity in the archive.

Stories
0
Comments
2
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 2

  1. Re:JAVA on Platform Independent C++ OS Library? · · Score: 1

    Actually, "this platform independent lib you are looking for is called" the Java API.

    Lately, it's increasingly being made available for languages besides the Java language. And, yes, native C++ is one of them. The core Java APIs (java::lang, java::io, java::util) can be used directly from C++ without requiring a JRE or VM for development or deployment.
    NewJ for C++: Java API for Native C++

    Positives: The library is small in size and light in resource usage. Objects are managed deterministically much like C++ smart pointers and not at the whim of the GC, which may be very important for embedded systems. Applications can be deployed as a single .EXE to a flash drive and run directly.

    Negatives: Presently, java::net API classes are a work in progress, and there's no Linux version. Presently, it's only for Win32 and Windows Mobile.
    NewJ: FAQ

  2. Automated Object Management in NewJ for C++ on Experiences w/ Garbage Collection and C/C++? · · Score: 1
    We considered using the Boehm collector for our commercial product, NewJ Library for C++. But we opted not to due to Boehm's lack of predictable object destruction and its maintenance of separate heaps, complicating integration with existing libraries. These issues are covered in detail in a recent C/C++ User's Journal (CUJ) article on the Boehm collector.

    Instead, we developed our own automated object management facility based on reference objects, that is, "smart pointer" objects with these new capabilities: Reference objects in C++ are completely synonymous with object references in Java. Unlike traditional smart pointers, reference objects support inheritance, both single-implementation inheritance and multiple-interface inheritance. These inheritance characteristics also apply to reference objects of arrays. They can also be built to be rigorously threadsafe and secure.

    Reference objects have allowed us to port Java source code directly to C++ with virtually no changes. They have also allowed us to take advantage of productive Java language features in new C++ projects without the overhead or installation of any JRE or VM. delete has disappeared from our C++ code entirely. At the same time, our C++ is still characteristically lean and interoperates naturally with other C/C++ libraries and APIs, such as ANSI C++ STL, Win32 API, and MFC.

    We have used these concepts to implement the core Java API in C++, for C++, although reference objects themselves are not specific to this API. They are implemented in our low-level Pie Library and usable in any C++ application.

    Info and features of NewJ and Pie Library

    The NewJ C++ Developer's Guide explains reference objects more fully. It is available as a free download (registration required).