Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!umd5!ncifcrf!nlm-mcs!brl-adm!brl-smoke!gwyn From: gwyn@brl-smoke.ARPA (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: Should I convert FORTRAN code to C? Message-ID: <8184@brl-smoke.ARPA> Date: 29 Jun 88 16:52:18 GMT References: <2742@utastro.UUCP> <20008@beta.UUCP> <224@raunvis.UUCP> <1189@mcgill-vision.UUCP> <20454@beta.lanl.gov> <829@garth.UUCP> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB)) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 13 In article <829@garth.UUCP> smryan@garth.UUCP (Steven Ryan) writes: >C does not provide custom data types either. It permits new structures, >but those are not orthogonal to the primitive types: no new operators, >no new casts, (on some implementation) no new assignments, ... Wrong on all those counts. C allows casting to any defined type and assignment of any structure type. (If you feel like using an array, wrap a structure around it -- it's free.) New operators can be defined as macros or functions. The one thing missing is overloading of existing built-in operator tokens such as "*"; C++ supports that but C does not. However, operator overloading is vastly overrated; most operations on extended data types do not map (unambiguously) onto the conventional arithmetic operations. Complex numbers are about the only case that does.