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.

A Random Walk Through Ada (2014)

65 pointsby okl6 months ago

8 comments

ajdude6 months ago
For those interested in trying Ada out, I wrote a a Rustup-like app that installs Ada&#x27;s package manager (Alire) on macOS and Linux: <a href="https:&#x2F;&#x2F;www.getada.dev" rel="nofollow">https:&#x2F;&#x2F;www.getada.dev</a><p>It was also featured on HN (194 points | 6 months ago | 117 comments: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=40132373">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=40132373</a><p>I&#x27;ve gone from not having anything Ada related on my computer to installing the toolchain, initiating a project , writing, compiling, and running &quot;Hello World&quot; in less then 2 minutes.<p>Ada has had something of a resurgence in the last couple years, with the latest standard (2022) officially released and for the first time in a few years, Ada has its own dev room at FOSDEM! <a href="https:&#x2F;&#x2F;fosdem.org&#x2F;2025&#x2F;news&#x2F;2024-10-28-devrooms-announced&#x2F;" rel="nofollow">https:&#x2F;&#x2F;fosdem.org&#x2F;2025&#x2F;news&#x2F;2024-10-28-devrooms-announced&#x2F;</a><p>There&#x27;s also a growing community at ada-lang.io with a thriving forum: <a href="https:&#x2F;&#x2F;forum.ada-lang.io&#x2F;" rel="nofollow">https:&#x2F;&#x2F;forum.ada-lang.io&#x2F;</a>
guenthert6 months ago
&gt; It being a one-pass compiler bugs me (there is no excuse for a modern language to require forward declarations).<p>He refers to the need for forward declarations as &quot;one-pass compiler&quot;. Historically at least, Ada compilers were infamous for requiring many passes and being consequently slow.<p>Whether it is still acceptable for a programming language to require forward declaration seems to me rather a matter of personal taste. Sure, compilers improved and there&#x27;s plenty of memory for them to use, but human programmers&#x27; capacity increased little, if any, I&#x27;d think. I think of those forward declarations as form of double-entry bookkeeping.
评论 #42095238 未加载
评论 #42098573 未加载
roland356 months ago
I once did an engineering camp at the Air Force academy and in one of the classes we programmed Lego mindstorms with Ada - something like <a href="https:&#x2F;&#x2F;www.adacore.com&#x2F;academia&#x2F;projects&#x2F;real-time-mindstorms" rel="nofollow">https:&#x2F;&#x2F;www.adacore.com&#x2F;academia&#x2F;projects&#x2F;real-time-mindstor...</a><p>I do wish we had better options for embedded! Even C++ isn&#x27;t making much headway against C when it comes to programming microcontrollers.
评论 #42096785 未加载
评论 #42095252 未加载
Jtsummers6 months ago
<a href="https:&#x2F;&#x2F;learn.adacore.com" rel="nofollow">https:&#x2F;&#x2F;learn.adacore.com</a><p>A collection of less random and more up to date walks through Ada if this piqued your interest. It&#x27;s been kept up to date with the latest language features and more tutorials. Also, helpfully, has comparative tutorials to see some features side-by-side in Ada, Java, C++, and C.
pyjarrett6 months ago
I recently started writing Ada again, a couple of years after I did a bunch of projects with it. The amazing things is how easy it is to go back and update old code due to how much semantic information gets embedded in it and how few symbols it uses.
adrian_b6 months ago
There is a phrase that might be confusing for those who do not know Ada:<p>&quot;As a historical note, earlier versions of Ada forbade reading from out variables, which allowed more efficient calling conventions, but modern Ada allows it because otherwise people went insane.&quot;<p>What is meant is that the &quot;out&quot; parameters behave like local variables without initializers, which upon entry into a function are likely to have invalid values.<p>Therefore you cannot read an &quot;out&quot; parameter before assigning a value to it. After the first assignment, it can be read or written at any time before the function returns.<p>Depending on the type, an &quot;out&quot; parameter is implemented as either a CPU register whose value is unknown upon function entry or as a reference to a memory area allocated in the caller, but uninitialized.<p>The specification of the function parameters as &quot;in&quot;, &quot;out&quot; or &quot;in out&quot; and the irrelevance and transparency of how the compiler chooses to pass the parameters is one of the best features of Ada.<p>This has not been invented by the creators of Ada, but it has been invented by some anonymous Department of Defense employees or contractors.<p>This feature was included in the DoD &quot;Requirements for High Order Computer Programming Languages&quot;, &quot;IRONMAN&quot; from the July 1977 revision. It was probably already present in the first version of &quot;IRONMAN&quot; from January 1977.<p>It is a huge mistake in the design of almost all programming languages that have appeared after Ada that they do not include this feature.<p>The lack of distinction between &quot;out&quot; and &quot;in out&quot; parameters has serious consequences especially for the object-oriented languages. The lack of this feature has caused a very large part of the complexity of C++ and also most of the performance problems of the C++ versions from before 2011.<p>When &quot;out&quot; and &quot;in out&quot; parameters are distinguished, there is no need for the existence of constructors as a separate concept. Any ordinary function with an &quot;out&quot; parameter can be used wherever C++ requires a dedicated constructor. Instead of constructors, it is enough to have an identifier convention for functions that should be called by the compiler when you want implicit initialization or implicit conversions.<p>Moreover, there is no need to care about &quot;copy&quot; semantics and &quot;move&quot; semantics or about temporaries which are or which are not generated by the compiler. It is easy for the compiler to always choose the best implementation without programmer intervention, when it knows the correct parameter modes for the functions.
评论 #42094753 未加载
评论 #42095366 未加载
dang6 months ago
Related:<p><i>A Random Walk Through Ada (2014)</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=12850919">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=12850919</a> - Nov 2016 (88 comments)<p><i>A Random Walk Through Ada (2014)</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=9674408">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=9674408</a> - June 2015 (14 comments)
tolerance6 months ago
Few things can draw your attention to subjects that you don&#x27;t understand better than appealing visual design and clear language.