Hi,

Whenever I have had to work with templates in C++, I have felt a shiver. I
am not sure if its just me, but I find something about templates that makes
me think that it is not working the way it is supposed to. Besides, there
are many forums and tutorials that discuss how to use templates with
multiple files. What surprises me is that the use of template forces one to
'include' the implementation file and  cannot compile it separately, which
seems a more intuitive behavior.

I heard about a purely object oriented design in SCALA and was pretty
impressed by that. All objects inherit from "ANY" object. That is something
that will allow templates in C++ to be far simpler than what the current
implementation is .

Is there any library in C++ that re-creates the existing data-types in a
similar manner ? Or if such a library is created, would it be useful ?

I have the following structure (tree-like) in mind.


AnyClass
   OrderedType
       Integer
       Float
       UInt
       Double
       BigInt
       Char
       String


This is just a basic idea. I was thinking of implementing something like
Trees and Lists using this structure (mainly OrderedType), that will allow
me to demonstrate the use of the library replacing templates.


Need suggestions and opinion
-- 
ubuntu-in mailing list
ubuntu-in@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-in

Reply via email to