From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 5b1e799cdb,3ef3e78eacf6f938 X-Google-Attributes: gid5b1e799cdb,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!feeder.news-service.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Andrew Reilly Newsgroups: comp.lang.eiffel,comp.lang.ada,comp.lang.modula3,comp.lang.pascal,comp.programming Subject: Re: Alternatives to C: ObjectPascal, Eiffel, Ada or Modula-3? Date: 19 Jul 2009 01:04:47 GMT Message-ID: <7cf9peF2758tgU1@mid.individual.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: individual.net zAL4QQ7gxOlh2sNsKzqVLQfxvJxldgnI8XE9lmR+K7aORtNR9e Cancel-Lock: sha1:JsfeCMGfbSheIyDCFh0iWM/a0aI= User-Agent: Pan/0.133 (House of Butterflies) Xref: g2news2.google.com comp.lang.eiffel:308 comp.lang.ada:7145 comp.lang.modula3:34 comp.programming:11780 Date: 2009-07-19T01:04:47+00:00 List-Id: On Sat, 18 Jul 2009 16:19:40 +0200, Andrea Taverna wrote: > So I have considered these alternatives: FreePascal, Eiffel, Ada and > Modula-3. > I have taken a look at all of them and I'm still undecided. Below are > the impressions I got for each language. Can you help me? Feel free to > recommend other languages as well. These are all fine choices of languages, but I wonder how much benefit you will be getting for yourself, as a sole-coder programming to produce results, rather than code? I think that you should consider stretching yourself a bit further: others have suggested Ocaml and Hascall. I'd add that modern Common Lisp (eg SBCL) ticks all of your boxes too. You might be surprised that there are some scheme implementations that will fit, too, and both of those are perhaps more "multi-paradigm" than the languages that you've got on your short list. In the end, though, you really need to check your decision criteria: 1: how fast is fast enough? Will you be waiting weeks for a run to complete, or will you be coding for weeks and then running for ten minutes? If the latter, something more expressive but perhaps a little further from "speed of light" ASM might be more helpful. Also, if your code will be spending most of its time in optimized library matrix algebra code (eg atlas) then it doesn't matter much how the language itself fares. (eg Matlab is slow but expressive unless you use it as a wrapper around BLAS/LAPAC, in which case it's hard to get close to.) 2: How much do you really need object orientation? Inheritance isn't necessarily particularly useful for a lot of numerical code, and there are lighter-weight strategies that support modular and safe coding. 3: Libraries are good to have. You'll find that C and Fortran still have the lions share of the numerical ones, though. 4: Garbage collection is really nice to have, as a programmer. Leave this one in, but recognize that (a) you can do it in C if you want to and (b) doing without involves more pain but can be made to work. See (1). 5: C and Fortran don't give you much of this out of the box, it's true, but C has assert(), and used wisely and extensively in your own code will give you some of the same "catch mistakes early" benefit of language- supported checks, and you can turn it off with -DNDEBUG. The lisps and schemes typically have a very wide range of "knobs" to control the amount of run-time checking that they do. 6: C is simple and consistent. When I had my own "C ennui" experience a couple of years ago, I picked scheme, on the understanding that sometimes I would probably have to still write some C and assembler to support C-using colleagues and for ultimate performance. (And I wanted to learn something really different from C.) I've been happy with the outcome, so far. Cheers, -- Andrew