7 ms·
"Also, Ada’s strictness and correctness may be perceived as an anti-feature. When talking about general-purpose programming, businesses need fast development cy
by PikelEmi 9y ago
"Also, Ada’s strictness and correctness may be perceived as an anti-feature. When talking about general-purpose programming, businesses need fast development cycles and short delivery times. For the companies, to be successful, it’s far more important to be ahead of the competition even with an incomplete product than to let the customers wait and eventually abandon the project."
That is not necessary true when it comes to aerospace and defense projects. In these cases it not important to be ahead and have short delivery times, so here Ada is still suitable.
That the language is a general-purpose programming language does not mean that it is suitable for all application domains. You always need to use your common sense and experience too to choose the right tool for your task.
- rbanffy 9y agoThe same could be said about Haskell and I see it a lot in the startup space. Sometimes, being first to market is less of a problem than being the first to not to scramble your user's data.
- fuball63 9y agoAda's strong static typing may also produce less buggy code.
- rbanffy 9y agoI don't think it helps producing fewer bugs, but it makes writing some kinds of bug much harder.
- RhodesianHunter 9y agoThis two statements seem to contradict each other.
- rbanffy 9y agoYou'll write different bugs in different languages. You can't leak memory in Java (you can, but it's very hard), for instance, as you can in C. In Python, I often write code that barfs when it gets an object of a wrong type because parameter types are simply not enforced. The bugs I write in Lisp are entirely different from the ones I write in C. We'll always write bugs.
- nickpsecurity 9y agoThat's not the point, though. The point is that Ada lets us write without much extra effort: 1. Way fewer bugs in general. 2. Fewer severe bugs that become full-on crashes or hacks. 3. Fewer bugs we cant fail-saif on and/or recover from. Not all bugs are equal by far. Just see Rust's panics vs C's donate-PC-cycles-to-hackers technique.
- rbanffy 9y ago> C's donate-PC-cycles-to-hackers technique. I'll totally use that.
- kqr 9y agoBut if we agree that Ada reduces one kind of bug compared to, say, C, then we'd also have to come up with a class of bugs which Ada makes easier to write, in order to say that the number of total bugs stay constant while one kind decreases. I can't come up with such an example. You're right in that things are rarely black and white, but when it comes specifically to bug prevention, I think Ada is a strict improvement over many alternatives.
- nickpsecurity 9y agoHere's an apples to apples study proving otherwise: http://archive.adaic.com/intro/ada-vs-c/cada_art.pdf http://archive.adaic.com/intro/ada-vs-c/cada_art.pdf The others from that time period by the military and defense contractors showed something similar. In only one case did I see C++ and Ada tie but why wasnt evident. Note this was before automated proving in SPARK, Design-by-Contract in Ada 2012, and co tract/type/property-based testing tech. The numbers would likely be even higher. Of course, one would want a comparison against tech designed for same things in C which are plentiful now.
- rbanffy 9y agoI was talking specifically about the strong typing, but this is an awesome study comparing two languages with strong typing. Thanks for sharing. There probably is a point where the strictness of the typing starts influencing the bugginess of the code.
- irundebian 9y agoC isn't typed strongly.
- rbanffy 9y agoThe parts that allow you to do unsafe casting are easily detected by a static analysis.
- dozzie 9y agoYou'd be surprised how much code you can move from conditional instructions to data types if you have a good type system, and if this type system is a static one, you get it checked before your program even starts.
- vram22 9y agoF# has this too. Other languages too, of course. Heck, even Pascal has a limited form of it - enumerated types and user-defined array types etc. - years ago.
- gaius 9y agoThat is not necessary true when it comes to aerospace and defense projects They chose to use C++ for the F35, which is buggy as hell, because they thought there were no Ada programmers available. But if you are planning a multi-decade project wouldn't you just... train some yourself?
- user5994461 9y agoIt's a fair assessment. There are almost no Ada programmers available. There will be less and less in the future. It's a difficult language, on par with C++. It's tough to learn, even if you already have a decade of C++. I think it's fair to pick Ada for that kind of project but it is also fair to avoid it. Either decision is justified.
- pjmlp 9y agoAda was relatively easy to learn by anyone in the past with Object Pascal or Modula-2/3 knowledge. Which used to be quite common before C and C++ got widespread during the mid-90's. Ada's biggest problem was the price of the compilers, and lack of adoption by OS SDKs, an issue that also pushed other languages outside of mainstream. Businesses already had to pay for the OS developer tools, unless there were legal requirements on their domain, they weren't keen in buying extra compilers.
- user5994461 9y agoAgreed on that. Ada was niche from the start because the tools were expensive and hard to procure. Then Windows and Linux became the dominant platforms and they are C only. Everything else died.
- pjmlp 9y agoMore like Windows and UNIX, not only Linux, but yeah that's the spirit.
- 9y ago
- tensor 9y agoAn incomplete product is one thing, but failing type checks implies a non-working product, not an incomplete product. Businesses need correct code. The real question is what is the fastest way to get correct code, using a language that isn't as strict and testing the heck out of your implementation, or using a language that is stricter but harder to learn and write? It seems to me in both cases you'll still need to test your code thoroughly, so not an easy question to answer.