From 193790543318502161 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f78e5,8f99fb45cc0aac84 X-Google-Attributes: gidf78e5,public X-Google-ArrivalTime: 2001-12-03 10:44:01 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!dispose.news.demon.net!news.demon.co.uk!demon!mail2news.demon.co.uk!not-for-mail From: Michiel Salters Newsgroups: comp.std.c++ Subject: Re: Some Thoughts on Numerical C++ Date: Mon, 3 Dec 2001 18:43:48 GMT Organization: http://www.newsranger.com Approved: Fergus Henderson , moderator of comp.std.c++ Message-ID: References: X-Trace: mail2news.demon.co.uk 1007405032 mail2news:11026 mail2news mail2news.demon.co.uk X-Complaints-To: abuse@demon.net X-Mail2News-Path: news.demon.net!mulga.cs.mu.oz.au X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov) X-Abuse-Info: When contacting newsranger.com regarding abuse please X-Abuse-Info: forward the entire news article including headers or X-Abuse-Info: else we will not be able to process your request NNTP-Posting-Date: Mon, 03 Dec 2001 07:39:40 EST X-Abuse: abuse@jtwis.com X-Added: Message sent through jtwis.com at 2001-12-03 07:39:55 Lines: 34 Xref: archiver1.google.com comp.std.c++:8427 In article , Scott Robert Ladd says... > >"Gabriel Dos Reis" wrote >> Concretely, what does that mean to take "an object-oriented approach >> to numerical programming"? > >A simple example: C99 and Fortran implement complex numbers as intrinsic >(POD) types; C++ uses a class template. The C++ approach is likely a bit >less efficient but more extensible and flexible. ? Why would templates be less efficient? Once the compiler had replaced (internally) complex by complex$double { double real,img; } it is as efficient as _Complex{ double real,img; }. BTW, compiler vendors are already allowed to implement the std:: library using intrinsics, if you can't notice it. complex<> looks like a prime canidate for specializations. Regards, -- Michiel Salters Consultant Technical Software Engineering CMG Trade, Transport & Industry Michiel.Salters@cmg.nl --- [ comp.std.c++ is moderated. To submit articles, try just posting with ] [ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ] [ --- Please see the FAQ before posting. --- ] [ FAQ: http://www.research.att.com/~austern/csc/faq.html ]