[mercury-users] Re: first impressions

Peter C. Chapin PChapin at vtc.vsc.edu
Tue Dec 27 23:12:04 AEDT 2011


Ada occupies the same design space as C and C++. By that I mean any time it would be reasonable to deploy a C or C++ program Ada would also be a reasonable choice. Thus it is common to compare Ada with those languages and with C++ especially since it has a similar richness.

 

So compared to C++ I find Ada significantly easier to read and understand. The syntax is simpler and, with appropriately chosen identifiers, Ada has a very prose-like style. Some people don’t like that and say the language is too verbose. I’m sure to a large degree that’s a matter of taste.

 

I don’t think there’s any doubt that the language is much safer to use than C or C++. Here I mean “safe” in the sense of avoiding bugs. The language imposes quite a few non-obvious restrictions on what you can do. It’s not unusual for the compiler to object to constructs that, to my mind, seem perfectly reasonable. I grumbled about that at first but then an interesting thing happened. After reworking my program so it would be acceptable to the compiler I discovered that the new version actually had a much better design. The language had forced me to write a higher quality program. It didn’t take too many experiences like that to convince me that it was a language worth using.

 

You can write crap software in any language, of course, including Ada. However with Ada you actually have to work at it. J

 

I’m attracted to Mercury because I see it as having some of those same qualities: a language designed for software engineering where both efficiency and safety are given priority. We need more programming languages like that, and those that exist need to be encouraged!

 

Peter

 

From: Charles Shuller [mailto:charles.shuller at gmail.com] 
Sent: Monday, December 26, 2011 15:46
To: Chapin, Peter @ VTC
Subject: Re: [mercury-users] Re: first impressions

 

Peter,

I've heard a lot about how code inspections (reading the code to find bugs) are much easier in Ada.   Do you find this to be the case???


Thanks!

Charles



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurylang.org/archives/users/attachments/20111227/9f2290aa/attachment.html>


More information about the users mailing list