No announcement yet.

Request: Lite Object Class Syntax.

  • Filter
  • Time
  • Show
Clear All
new posts

  • Request: Lite Object Class Syntax.

    PB COM objects are great, but too heavy to build objects such as arrays, lists, trees …etc.

    A lite object is just an allocated UDT referenced with pointer or handle.
    You can do anything with allocated objects that you can do with OOP, but it gets ugly.
    This is the way SQLite is written, allocated structures. (written in C).
    In C++, they’re called POD objects.

    A simple PB syntax wrapper around lite objects would solve a lot of problems.
    A minimalist implementation would be fine, even preferred.
    I would prefer that the user be responsible for allocating and freeing the object; like C++.

    Solves problem of dynamic arrays in UDT; write lite array class, store object handle in UDT. Same way C++ solved problem; STL vectors.

    Same for dynamic strings in UDTs; lite string class.

    Helps with namespace; only the class name has to be unique in global space. Variables and methods in class may have short names.

    A syntax wrapper around allocated UDTs would add zero overhead on memory and performance. (4 bytes per object if only allocated objects supported, like COM objects)

    Other Request:
    Inline Subs, Functions and Methods.
    Generics, if implemented real clean; not like C++.
    Dead Theory Walking
    Range Trie Tree
    HLib ~ Free Data Container Lib ~ Arrays, Lists, Stacks, Queues, Deques, Trees, Hashes