Live data from Hacker News

Why Ada Is the Language You Want to Be Programming Your Systems With

hackaday.com

21–30 of 330 posts

Re: Why Ada Is the Language You Want to Be Programming Your Systems With

#21

If you've done VHDL, you'll be familiar with Ada's syntax. When the DoD commissioned the design of VHDL, they required that its syntax be based on Ada. https://en.wikipedia.org/wiki/VHDL#History

TIL VHDL was commisioned by the DoD.

Also random note, but wouldn't most engineers familiar with HDL's be electronic engineers rather than software developers?

Re: Why Ada Is the Language You Want to Be Programming Your Systems With

#22

What is the employment market like for Ada?

I've seen a lot of Ada code in aerospace projects, but the trend for 15+ years seems to be to write new projects in something else (usually C or C++), and sometimes even rewrite old Ada software.

In this industry, knowing Ada could still be useful, even if only to read it.

Re: Why Ada Is the Language You Want to Be Programming Your Systems With

#23
post #20

What is the employment market like for Ada?

There's some non-DOD avionics floating around that are ADA, I guess because of requirements and regulatory overlaps. http://archive.adaic.com/projects/atwork/boeing.html

Interesting. I imagine most Ada jobs (gov and non-gov) would have similar requirements to embedded jobs?

Re: Why Ada Is the Language You Want to Be Programming Your Systems With

#25
post #5

I first read about Ada in JARGON: Ada:: n. A {{Pascal}}-descended language that has been made mandatory for Department of Defense software projects by the Pentagon. Hackers are nearly unanimous in observing that, technically, it is precisely what one might expect given that kind of endorsement by fiat; designed by committee, crockish, difficult to use, and overall a disastrous, multi-billion-dollar boondoggle (one co…

The situation remains the same: Jargon file is bad.

Re: Why Ada Is the Language You Want to Be Programming Your Systems With

#26

If you've done VHDL, you'll be familiar with Ada's syntax. When the DoD commissioned the design of VHDL, they required that its syntax be based on Ada. https://en.wikipedia.org/wiki/VHDL#History

It's interesting to see how Verilog & C both took over there in the industry. There's probably a chasm where the extra typedness isn't worth the velocity cost at the beginning of a project and when it's valuable the weight of switching can be too great. I think the middle ground is a language where you can relax some of your rules but then as pieces mature you can start enforcing stricter typing rules. I observe the…

I tend to disagree: strong typing is very valuable in the hardware design space - it's just that you couldn't convince hardware devs of this. If they had exposure to a programming language it was C (and possibly some assembly language) so they wanted something closer to what they were familiar with.

When I worked in EDA I was given a project to get rid of linting errors in our generated HDL code. We generated both VHDL and Verilog. Our generated VHDL had very few problems thanks to strong typing. But there were lots of problems to fix in the Verilog code caused by it's weak typing.

Re: Why Ada Is the Language You Want to Be Programming Your Systems With

#27
I've developed a set of "strongly typed" classes in C++ that have saved me a ton of grief.

Here are some examples. All classes are fundamentally floats. Errors are caught at compilation.

    cInches i1, i2, i3;
    cCm cm1, cm2;

    i1 = 1.f;  // error
    i1 = cInches(1.f);  // OK
    i3 = i1 + i2;  // OK
    cm1 = i1;   // error
    i1 = i2 * 2.f;  // OK
    float f1 = i1 / i2;  // OK
    i1 = i2 * i3;  // error! square inches are not inches

    int add(cInches in1, cInches in2);
    add(i1, i2);  // OK
    add(cm1, cm2);  // error
'Typedef's just don't cut it.

Re: Why Ada Is the Language You Want to Be Programming Your Systems With

#28

First, this is a great introduction article to Ada. It's a great history lesson, and analysis of where it's used and why. That said, it seems to be arguing for something in a vacuum. Where is the mention of other new programming languages that also fit this category? Where is the mention of Rust? Rust fits all the same requirements: - A general, flexible design that adapts to satisfy the needs of embedded computer ap…

> - Easy to implement the language specification. All features should be easy to understand.

I'm not sure this is at all applicable to rust. Perhaps once there are more than the one, quickly mutating, implementation, we can say that it's easy to implement the specification.

> - Reliability. The language should aid the design and development of reliable programs.

This one feels a touch questionable, given the built-in "succeed or die" macros that simplify code at the cost of reliability. There's also the unsafe keyword, and how the impact of an unsafe operation in one section of code (say, an imported library) can have negative impacts on unrelated sections of code otherwise deemed safe.

> - No unnecessary complexity. Semantic structure should be consistent and minimize the number of concepts.

Borrow checker aside, there is a ton of complexity in Rust (traits, multiple flavors of arrays, multiple flavors of boxed values).

> - Machine independence. The language shall not be bound to any hardware or OS details.

Rust relies on the LLVM project to provide this, and relies on the contributors to the LLVM project to target different architectures.

Re: Why Ada Is the Language You Want to Be Programming Your Systems With

#29

First, this is a great introduction article to Ada. It's a great history lesson, and analysis of where it's used and why. That said, it seems to be arguing for something in a vacuum. Where is the mention of other new programming languages that also fit this category? Where is the mention of Rust? Rust fits all the same requirements: - A general, flexible design that adapts to satisfy the needs of embedded computer ap…

> Where is the mention of other new programming languages that also fit this category? Where is the mention of Rust?

The article is about Ada. If you want to read about Rust, go read about Rust.

Re: Why Ada Is the Language You Want to Be Programming Your Systems With

#30
post #18

Earlier quoted context omitted.

Languages with the kind of constraints (sometimes kicked up to 11) that inspired the term “bondage and discipline languages” [0] have come back into vogue in a big way since the heyday of the Jargon File, and are in many cases the new “languages of choice” [1]. [0] http://catb.org/~esr/jargon/html/B/bondage-and-discipline-la... [1] http://catb.org/~esr/jargon/html/L/languages-of-choice.html

Not saying strong typing is good or bad, but I think tools allow strong typing much more conveniently now than when that B&D sentiment was written. Back then, you'd use vi/emacs and have to argue constantly with the type checker until it was placated. Now of course, your IDE will complete based on what's allowed in the Context.You().are.typing and it's more of a correct by construction affair. Ada might have faired d…

I think you mean static typing. For instance, Python is strongly and dynamically typed.
Post reply on HN