Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It was my first language i learned in school... in Radford ( Virginia), before my university switched to Java. ADA was/is popular with defense contractors, so a lot of schools in VA teach it.

It is very safe language, being both static typed, and strong typed. It was originally a procedural language, but later they added some OO to it. (to folks that don't know what a imperative language is, think of a language where all methods are like Java Static methods, and you store data in some global space).

It can get a bit wordy to program with it, but I also like the lack of '{' bracket use everywhere that C like syntax has. With some modifications, ADA can be transformed into a great/fun language.

Anyway, due to its small echosystem and adoption, I think it will remain a 'defense/aeronautic industry' only type of language.

This is a simple program, and I think it is fairly elegant, but a bit wordy:

  with Ada.Text_IO; use Ada.Text_IO;
  with Ada.Integer_Text_IO; use Ada.Integer_Text_IO;

  procedure Check_Positive is
     N : Integer;
  begin
     Put ("Enter an integer value: ");  -- Put a String
     Get (N);  --  Read in an integer value
     if N > 0 then
        Put (N);  --  Put an Integer
        Put_Line (" is a positive number");
     end if;
  end Check_Positive;


People need to stop using "wordy" when they mean "readable."


Readable is a matter of education. As a C++ programmer I've learned what {} means, and so that is more readable than begin/end which happens to not be the block symbol in any language I know well. Considering all the languages I know I've concluded that block symbols are important enough to be worth learning as a separate symbol (Looking at python where it is white space). Of course I can learn begin/end, but it isn't worth typing those extra letters of the word when something that common can be done in one.

Note too that {} graphically indicate the open/close in a way that begin/end is another reason not to like begin/end.


I've done plenty of C and C++, so I know what {} means, it's just that braces are harder to see, especially when there's a lot of them.


That's not necessarily the same thing though. Verbosity can obscure the information you're trying to gather from the code you're reading. A "can't see the forest for the trees"-kind deal.


I cannot see the source code for the documentation. This happens to me in so many cases. I work with a couple of codebases that have 90% documentation, 10% code. In Ada, code IS the documentation that also can be formally verified. It is wonderful.


I think I've heard "the code is self-documenting" a hundred times in my career and it hasn't been true once.


Yup, look at any driver in the Linux kernel.


It looks similar to Pascal? I learned to program in Pascal as a kid always had a soft spot for it


Pascal is one of Ada's parents, definitely. I did Pascal then transitioned to Ada quite easily in university.


Oh, double-hyphen for comments! So maybe that's where SQL got it's comment style from? I'm not sure which SQL spec defined it and what is its overall availability, but it's defined in DB2 and Oracle SQL languages so I'd say it predates the SQL-1992 standard. I think it's also available in MySQL SQL and pgSQL, with a required space between the dashes and the comment text.


Definitely, early PLSQL is inspired by Ada. See here: https://www.orafaq.com/wiki/Ada




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: