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,start X-Google-Attributes: gid5b1e799cdb,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!feeder.news-service.com!188.40.43.213.MISMATCH!feeder.eternal-september.org!eternal-september.org!not-for-mail From: Andrea Taverna Newsgroups: comp.lang.eiffel,comp.lang.ada,comp.lang.modula3,comp.lang.pascal,comp.programming Subject: Alternatives to C: ObjectPascal, Eiffel, Ada or Modula-3? Date: Sat, 18 Jul 2009 16:19:40 +0200 Organization: A noiseless patient Spider Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.eternal-september.org U2FsdGVkX1+O9KahKn6SI1TWbl1lMOJd2eGxkH3kdeV+RT6+QThIaiIn560Ca52lGGZIFCGr3L2zrNYhPxlzWcvRvbBuZKsCbOKjZC46G+qpzqQzMN/+a0GPJBdLUrr5R9+LeZPPTrk= X-Complaints-To: abuse@eternal-september.org NNTP-Posting-Date: Sat, 18 Jul 2009 14:20:16 +0000 (UTC) X-Auth-Sender: U2FsdGVkX1+XeSPsiGAy0rgobgGTUXNWB9CvClhHHFQ= Cancel-Lock: sha1:gLFHzZNjwdED81V7Wzs5N9RwnOU= User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.14) Gecko/20080501 Fedora/2.0.0.14-1.fc9 Thunderbird/2.0.0.14 Mnenhy/0.7.6.666 Xref: g2news2.google.com comp.lang.eiffel:294 comp.lang.ada:7128 comp.lang.modula3:21 comp.programming:11752 Date: 2009-07-18T16:19:40+02:00 List-Id: Hi folks! I'm a CS student and I often need to write number-crunching code dealing with combinatorial optimization problems. What I do usually is implementing ad-hoc algorithms and testing their performance against other previously-known solutions, including general solvers. In the past I used C, but now I have decided to change language. I'm looking for a "better" one. Here follow the features it should have, ranked approximately by relevance: 0) open-source support and an alive community 1) directly compiled to efficient code 2) statically typed and object-oriented, better if multi-paradigm 3) general-purpose libraries (possibly standardized, either by standard or de facto), including containers and some math abstractions. 4) garbage collected. As an alternative, provide memory management policies via libraries (e.g. memory pools and such) 5) optional run-time checks and some kind of control over compilation and low-level issues 6) "relatively simple and consistent" 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. TIA --> Impressions I got for each language - FreePascal is a safe and modular alternative to C and C++, but it is also close to the latter in terms of expressiveness. Moreover it doesn't seem to have the libraries I need. ==>Qualifies for 0,1,2,5. Not sure about 3 and 4 - Eiffel is geared toward application programming in medium/large-sized teams relying heavily on OO modelling. It is designed for (re)usability, correctness and efficiency in this order. My needs are somewhat different though. The main gripe I have with Eiffel is the lack of a well-documented standard gpl'ed library. GOBO and EiffelBase seem to have incomplete or non-free documentation and I couldn't find tutorials; as such, I couldn't get a clear picture about them. ==> Qualifies for 0,1,2,4,5 and 6. Not sure about 3. - Ada is best suited for large teams and/or critical software, thus it may be overkill for my work, OTH it could have anything I might happen to need. What holds me from jumping onto Ada is the potential complexity It would be interesting to hear the experience of other people learning Ada from the C/Java background. As for memory management (requirement 4), I heard there are different takes on the matter: (a) Ada uses dynamic stack allocation a lot, and in a transparent way, reducing the need of manual management (MM) (b) Ada libraries adopt idioms that further simplifies MM issues (c) Conservative garbage collectors such as Bohem's can be used with Ada, and they are supposed to work "better" with Ada than with unsafe languages such as C and C++ So can MM be said to be easier in Ada than in C? I hope Ada-ers will mercifully shed some light on the issue. There seems to be a lot of Ada95 free documentation on the net, I guess it's suitable for Ada05 as well. ==> Qualifies for 0,1,2,3,5 and, partially, 4 - Modula-3 is simpler/smaller than Ada and has been successfully used for system/application programming. It seems to be the most consistent, simple and easy to grok, but I couldn't find any container/math library ready to use. ==> Qualifies for 0,1,2,4,5,6.