TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Introduction to Ada

206 pointsby jayp1418over 4 years ago

30 comments

guerbyover 4 years ago
One thing I liked about Ada is that the authors of the language also wrote why they choose things the way they are, what was rejected, etc... Their is a document about this called &quot;The Ada Rationale&quot; available on the web:<p><a href="http:&#x2F;&#x2F;www.ada-auth.org&#x2F;standards&#x2F;rationale12.html" rel="nofollow">http:&#x2F;&#x2F;www.ada-auth.org&#x2F;standards&#x2F;rationale12.html</a><p>I did contribute the HTML version of the Ada 1995 Rationale (first language revision) back in the day:<p><a href="https:&#x2F;&#x2F;www.adaic.org&#x2F;resources&#x2F;add_content&#x2F;standards&#x2F;95rat&#x2F;rat95html&#x2F;rat95-contents.html" rel="nofollow">https:&#x2F;&#x2F;www.adaic.org&#x2F;resources&#x2F;add_content&#x2F;standards&#x2F;95rat&#x2F;...</a>
评论 #24362164 未加载
评论 #24367519 未加载
jcadamover 4 years ago
I spent about 4 years of my early career working with Ada in the aerospace industry (specifically, I worked on the GPS satellite program). It was rather career-limiting because I ended up as a young engineer with a lot of experience in an extremely niche language.<p>It took a while, but I was finally able to escape and start working with more modern technology (involved a lot of self-learning on side projects and finally finding a rare employer that believed engineers are capable of learning new skills).<p>I do occasionally get emails from recruiters looking for Ada programmers - they&#x27;re exclusively for legacy maintenance. Fortunately, I&#x27;m in a position to ignore them now :)<p>As a language, Ada isn&#x27;t bad. I&#x27;d prefer it over C++ or Golang for sure, but there just isn&#x27;t enough interesting work going on using Ada to warrant investing time in learning the language.
评论 #24364831 未加载
评论 #24363113 未加载
评论 #24362947 未加载
评论 #24362963 未加载
dwheelerover 4 years ago
The GNAT Ada compiler is open source, generates good code, and has really good error messages. There&#x27;s a story behind its development, which I tried to summarize here:<p><a href="https:&#x2F;&#x2F;dwheeler.com&#x2F;essays&#x2F;make-it-simple-dewar.html" rel="nofollow">https:&#x2F;&#x2F;dwheeler.com&#x2F;essays&#x2F;make-it-simple-dewar.html</a>
评论 #24361784 未加载
评论 #24366631 未加载
1vuio0pswjnm7over 4 years ago
The original open source Ada83 compiler that grew into GNAT for Ada95 was written in setl.<p>The author of GNU setl has said he would release the source, but we&#x27;re still waiting. There are binaries here:<p><a href="https:&#x2F;&#x2F;setl.org&#x2F;setl&#x2F;bin&#x2F;" rel="nofollow">https:&#x2F;&#x2F;setl.org&#x2F;setl&#x2F;bin&#x2F;</a><p>(No NetBSD ones though, forcing us to use emulation)<p>Ada reminds me of spitbol, and setl can be written in spitbol. R K Dewar&#x27;s spitbol, written in a portable assembly language called MINIMAL, has been open-sourced. There&#x27;s a version of setl written in spitbol, too. Hopefully we will have the source for setl one day.<p>The author&#x27;s dissertation on setl is a favourite of mine:<p><a href="https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20060823004442if_&#x2F;http:&#x2F;&#x2F;www.cs.nyu.edu:80&#x2F;~bacon&#x2F;phd-thesis&#x2F;diss.pdf" rel="nofollow">https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20060823004442if_&#x2F;http:&#x2F;&#x2F;www.cs....</a><p>See also<p><a href="https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20100217021505if_&#x2F;http:&#x2F;&#x2F;www.setl-lang.org:80&#x2F;docs&#x2F;setlprog.pdf" rel="nofollow">https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20100217021505if_&#x2F;http:&#x2F;&#x2F;www.set...</a>
评论 #24362250 未加载
meejover 4 years ago
I got to use Ada for eight months in 1997, on a co-op at Rockwell-Collins in their General Aviation department. I learned and wrote a lot of Ada and I loved it. When I had to go back to school in the fall, I was no longer interested in writing C++ and it kind of bummed me out to have to use it again.
评论 #24367081 未加载
评论 #24362236 未加载
WalterBrightover 4 years ago
I always liked Ada, from my first reading around 1980 of MIL-STD-1815. Many of D&#x27;s features were inspired by Ada.
评论 #24361206 未加载
评论 #24361728 未加载
guerbyover 4 years ago
Another thing is that the language backers made sure the ISO standard was available at no cost which was not obvious in the eighties so students could read it.<p><a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;ISO&#x2F;IEC_8652" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;ISO&#x2F;IEC_8652</a><p>I was told that the Ada guyes fought with ISO to have a per paragraph numbering to ease translations and references, ISO (at the time, don&#x27;t know now) was line numbered, but they lost.
synackover 4 years ago
I wish Rust had Ada&#x27;s type system. It makes a lot of sense to define types specific to your algorithms and have the storage type determined at compile time.
评论 #24364577 未加载
the_dukeover 4 years ago
I&#x27;d be very interested in someone with substantial experience in Ada&#x2F;Spark providing some insight:<p>* Why did Ada not manage to get a significant foothold outside of some small domains?<p>* What&#x27;s great, what&#x27;s not so great about it?<p>* How &quot;modern&quot; does the language feel, including the tooling, documentation, etc? Specifically Spark 2014. ( I see a LSP server and VSCode plugin, for example)<p>* Spark2014 seems to be open source, with a GPLv3 license. Is this what most companies use, or are there significant closed source parts that must be bought? Are most companies still on older versions?<p>* What other languages are most similar?
评论 #24362011 未加载
评论 #24362114 未加载
评论 #24364253 未加载
评论 #24372020 未加载
wirrbelover 4 years ago
After having seen the C++ guidelines of the automobile industry i wish we&#x27;d just use Ada more..
评论 #24361087 未加载
评论 #24363450 未加载
stolen_biscuitover 4 years ago
Ada is one of those languages that I always wish I had a reason to program in
评论 #24360780 未加载
评论 #24360754 未加载
评论 #24360781 未加载
评论 #24362308 未加载
评论 #24360965 未加载
MaxBarracloughover 4 years ago
Looks like a good tutorial, but it doesn&#x27;t go into much depth on memory-management. The <i>More About Types</i> section has a little. It mentions that automated reference-counting is available through the GNATCOLL library, which seems to have since been broken apart into three different packages [0], so it now resides in <i>gnatcoll-core</i> [1].<p>Can anyone comment on memory-management in Ada?<p>[0] <a href="https:&#x2F;&#x2F;github.com&#x2F;AdaCore&#x2F;gnatcoll" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;AdaCore&#x2F;gnatcoll</a><p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;AdaCore&#x2F;gnatcoll-core&#x2F;blob&#x2F;master&#x2F;src&#x2F;gnatcoll-refcount.ads" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;AdaCore&#x2F;gnatcoll-core&#x2F;blob&#x2F;master&#x2F;src&#x2F;gna...</a>
评论 #24362043 未加载
评论 #24362177 未加载
guerbyover 4 years ago
Fun fact GNAT (GCC Ada front-end) will use a biased representation for range type when packing tight:<p><pre><code> with Ada.Text_IO; use Ada.Text_IO; procedure T is type T1 is range 16..19; type T2 is range -7..0; type R is record A : T1; B,C : T2; end record; for R use record A at 0 range 0 .. 1; B at 0 range 2 .. 4; C at 0 range 5 .. 7; end record; X : R := (17,-2,-3); begin Put_Line(X&#x27;Size&#x27;Image); -- 8 bits end T;</code></pre>
评论 #24362015 未加载
pietroppeterover 4 years ago
Very nice introduction. For those interested in a modern language that has a strong type system as in Ada and it is also growing safety capabilities à la SPARK, you might want to check out Nim.<p><a href="https:&#x2F;&#x2F;nim-lang.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;nim-lang.org&#x2F;</a> <a href="https:&#x2F;&#x2F;nim-lang.org&#x2F;blog&#x2F;2020&#x2F;06&#x2F;08&#x2F;static-analysis.html" rel="nofollow">https:&#x2F;&#x2F;nim-lang.org&#x2F;blog&#x2F;2020&#x2F;06&#x2F;08&#x2F;static-analysis.html</a>
nihoover 4 years ago
Ada was the first language I learned at university back in 2003 (I had previously taught myself C&#x2F;C++, Assembler and VB). It had a huge impact on me and influenced my entire career and how I approach software engineering. These days languages like Erlang and Haskell are carrying on some of the ideas (modularity, type safety, concurrency, etc.) in more modern incarnations. But there is still something special about Ada.
pjmlpover 4 years ago
Just as a heads up that although Ada Core is the most well known and FOSS friendly Ada vendor, there are still around 5 compilers vendors.
评论 #24365537 未加载
Ice_cream_suitover 4 years ago
Their marketing folks should introduce Ada certification.<p>Many developers would jump through hoops to get any dodgy certification. I have seen dubious FEMA certifications and NFA certifications on some LinkedIn pages.
评论 #24360914 未加载
评论 #24360953 未加载
khazhouxover 4 years ago
Petty and inconsequential as this sounds, I&#x27;m convinced Ada go have gone farther if it didn&#x27;t have capitals and underscores in all their libs, and long keywords like `procedure`. All that shift-key action makes Ada a physically painful language to work in.
评论 #24360796 未加载
评论 #24360911 未加载
评论 #24360877 未加载
评论 #24361663 未加载
评论 #24360848 未加载
Lucretia9over 4 years ago
There are many industries that could benefit from Ada, but one in particular is the games industry, but then, they&#x27;d also have to start designing stuff, stop feature creep and changing every little thing all the time, and crunch.
Kototamaover 4 years ago
I like that the primitives types are so refined in Ada. That&#x27;s something that is missing in a lot of languages. You can define subtypes or different types and ranges from the integer type for example.<p>A few years ago, I wrote a little blog entry about it: <a href="https:&#x2F;&#x2F;www.dialectical-computing.de&#x2F;blog&#x2F;blog&#x2F;2011&#x2F;05&#x2F;08&#x2F;dear-language-designers-do-not-forget-ada&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.dialectical-computing.de&#x2F;blog&#x2F;blog&#x2F;2011&#x2F;05&#x2F;08&#x2F;de...</a>
评论 #24363591 未加载
cpetersoover 4 years ago
Does any other programming language use “Ada case” identifiers (mixing uppercase and underscores like &quot;XML_HTTP_Request&quot;) instead of camel case (&quot;XMLHTTPRequest&quot; or &quot;XMLHTTPRequest&quot;) or snake case (&quot;xml_http_request&quot;)? Ada case avoids the ambiguity of lowercasing acronyms or smooshing together of words.<p>(Yes, I know the actual capitalization of my example identifier in JavaScript is &quot;XMLHTTPRequest&quot;. That’s what makes it such a good example. :)
评论 #24368746 未加载
TedDallasover 4 years ago
Nice documentation. Ada looks a lot like Pascal. It is interesting that SPARK is a subset of subset of Ada.
评论 #24361684 未加载
评论 #24360909 未加载
jayp1418over 4 years ago
BTW this satellite was launched yesterday coded in ada :<p><a href="https:&#x2F;&#x2F;blog.adacore.com&#x2F;using-ada-for-a-spanish-satellite-project" rel="nofollow">https:&#x2F;&#x2F;blog.adacore.com&#x2F;using-ada-for-a-spanish-satellite-p...</a>
评论 #24371565 未加载
andi999over 4 years ago
Maybe somebody remembers better, but I remember when I looked into it over a decade ago, GNAT had the problem that it didnt have a GNU library linking exception or so. Does anybody remember the history?<p>Also I still find the whole environment confusing for windows. GNAT Programming Studio IDE seems to be useful, but what ballpark is the pricing for the commercial version. Anybody has an idea?
评论 #24372410 未加载
clircleover 4 years ago
I was a freshman CS student in 2007 and this was the language that I learned in CS 101. I wonder how common that was.<p>Frankly, that was my first exposure to programming, and I thought the language was strange enough and the prof wasn&#x27;t good enough, so switched majors. Still the only formal programming education I&#x27;ve had.
galacticdessertover 4 years ago
Totally unfamiliar with Ada, but reading below it seems that type safety and concurrency are big selling points of it. In which way would this better than a modern functional language, say F#?
johnisgoodover 4 years ago
My comments on Ada: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=23808305" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=23808305</a>
评论 #24362307 未加载
non-entityover 4 years ago
I&#x27;ve been intrigued by Ada for some years, but never really dived into it too much. I dont mind the language, but the tooling always seemed weird to me and it feels like any real world use of the language seems like its been relegated to legacy maintenance. Most of the time if I see Ada in a job description, it makes it seems like its something that&#x27;s nice to know because there&#x27;s a sliver of a chance you might have to rewrite or modify it, but majority of work will be done in something like C++, which is a shame.
throwaway889900over 4 years ago
Shame that the tools for Ada go from bad to worse even in the best case scenario. It&#x27;s no wonder nobody really wants to use the language when other languages have all sorts of tools and ecosystems around them that make everything a breeze.
评论 #24364721 未加载
aronpyeover 4 years ago
What an ugly, unintuitive language. Are there any benefits to Ada over something like c++?
评论 #24361455 未加载
评论 #24361886 未加载
评论 #24361718 未加载
评论 #24363662 未加载