Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!motcid!stephens From: stephens@motcid.UUCP (Kurt Stephens) Newsgroups: comp.lang.c++ Subject: Re: complex float z = 1.0i2.2; Message-ID: <6540@celery34.UUCP> Date: 18 Feb 91 20:42:32 GMT References: <1991Feb13.233418.26399@intellistor.com> Distribution: comp Organization: Motorola Inc., Cellular Infrastructure Div., Arlington Heights, IL Lines: 33 A class "wrapper" can be made around any built-in type quite easily. (I have a macro that does this quite nicely; I will post if anyone is interested. It will be even easier with templates.) The ability to use non-classed built-in types is a benfit. It allows easy migration from C to C++. It allows compilers to do optimizations. And allows the programmer access to machine representations. I don't want the C++ kernal to check bounds on every array I dereference, when I know what I'm doing. (How do you force bounds checking on a moving pointer? ;^) If I want an array with defineable bounds and bounds checking, I'll make a class. If I want to use complex numbers, I'll get a class library. Most programs don't need complex numbers. Making "complex" a class, and adding runtime array bounds checking, etc. leads to a more complicated language. (C++ is complicated enough ;^) Simple languages can be extended by adding libraries and such, but once you have standardized a big, complicated language, you can't go back. The simplicty and elegance of the C language is what allowed it to be so popular with imbedded systems with small processors. You can get a C compilier for any processor. It's almost a portable assembly language, which the world has needed for a long time. C++ is a great language to do OOPD. Let's not blow it with featurecide and big run-time overheads. Look at what happend to Common Lisp when too many people got there fingers in the pie. It has redundant primatives and features that most people would never use. (I'm not bashing lisp in general) However, I do like the idea of standardized class libraries. The NIHCL is good step in that direction. -- Kurt A. Stephens Foo Foo::Foo(){return Foo();} stephens@void.rtsg.mot.com "When in doubt, recurse."