From: "framefritti@..." Date: 2008-04-16T02:25:03+09:00 Subject: Re: Ada vs Ruby Interesting thread... also because I use both Ruby and Ada. No, better... since I _love_ both Ruby and Ada. Yes, they could not be more different and... no, I do not have any split-personality problem (at least, non that I am aware of it...:-) In my personal experience, they are both great languages and each one "shines" in its field. I use Ruby for small to medium-large applications where "duck typing" allows you to write good and flexible software in little time. However, I discovered that when I go to large to very large applications, a pedantic language as Ada (which would not allow you to write sqrt(5) because "5" is an integer and not a float... my first Ada program...) is a better choice since many errors are caught at compile time and many others just at the first few runs by the checks automatically inserted by the compiler. For example, if you write type Month_Day is new Integer range 1..31; MD : Month_Day := 30; MD := MD + 3; you will get a runtime error because MD exit from the allowed range. In C this bug could comfortably sleeps for centuries... Moreover, if you define type Counter is new Integer; Ada strong typing will prevent you to assign a value of type Month_Day to a variable of type Counter (the magic word is "new") and this makes a lot of sense, unless in your application you can convert a day into a counter. I discovered that when your software grows larger, this kind of constraints that you _ask to the compiler_ to enforce on you, can really help. [there are *lots* of discussion about the usefulness of the introduction of new incompatible types. The sentece above is just my opinion, based on some personal experience. I hope I did not open a new can of worms...] Maybe your initial productivity (mesured in lines of code written for unit of time) can be smaller because of the loss of flexibility, but if your software is very large you gain in debugging and maintenace time. Of course, if you just want to extract data from a CSV file, or write a wget-like program, Ada can be a "gun for mosquitos."