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)

123 pointsby akalinover 8 years ago

9 comments

Keyframeover 8 years ago
Every time I see something on Ada, it seems like a really nice language. Easy to read, easy to write, performance seems to be there with C++, easy (?) to interface with C, multi-threading seems to be somewhat easy too...<p>So, what&#x27;s the deal, where&#x27;s the catch? Why people aren&#x27;t jumping on it like they do with, I don&#x27;t know, Rust?
评论 #12851597 未加载
评论 #12851346 未加载
评论 #12856772 未加载
评论 #12853017 未加载
评论 #12851347 未加载
评论 #12851519 未加载
评论 #12852916 未加载
评论 #12857581 未加载
评论 #12852568 未加载
评论 #12853387 未加载
评论 #12852487 未加载
评论 #12851354 未加载
评论 #12851960 未加载
axman6over 8 years ago
(Reposting from lobste.rs)<p>It&#x27;s a shame there wasn&#x27;t more information on the tools Ada provides for concurrency - I haven&#x27;t seen another language which gives you as much flexibility and power to write safe concurrent code. It&#x27;s much more heavy weight than some other languages in some ways, but gives you very strong guarantees you don&#x27;t get elsewhere.<p>It also would&#x27;ve been nice to talk a bit about some of the features which make it particularly well suited for embedded systems:<p>* things like the ravenscare profile which give you a safe subset of the language using statically allocated never terminating threads<p>* the ability to select the scheduling algorithm (including ones with task priorities which are used to avoid the possibility of deadlocks completely - see the priority ceiling protocol for more details)<p>* the ability to address specific memory locations being built into the language, not just casting ints to pointers like you would in C<p>* full control over how elements on records are laid out, including endianness, this is essential with the previous feature when you&#x27;re dealing with memory mapped IO registers for controlling hardware<p>* the ability to define that certain data types can only be used at certain specific memory locations (see <a href="https:&#x2F;&#x2F;cs.anu.edu.au&#x2F;courses&#x2F;comp4330&#x2F;Lectures&#x2F;RTES-03%20Interfaces.01.pdf" rel="nofollow">https:&#x2F;&#x2F;cs.anu.edu.au&#x2F;courses&#x2F;comp4330&#x2F;Lectures&#x2F;RTES-03%20In...</a> &quot;pages&quot; 314 - 332)<p>For anyone who&#x27;s had to write code to interface with hardware on micro controllers, they&#x27;re probably wetting themselves with excitement by now, doing this in C relies on the compiler doing what you think it will, which there&#x27;s no guarantee of because the ability to use many of the features is implementation defined, if defined at all.<p>ANU&#x27;s COMP4330, which these slides come from, is an excellent resource for learning more about both Ada and real time systems in general: <a href="https:&#x2F;&#x2F;cs.anu.edu.au&#x2F;courses&#x2F;comp4330&#x2F;1-Lectures-Contents.html" rel="nofollow">https:&#x2F;&#x2F;cs.anu.edu.au&#x2F;courses&#x2F;comp4330&#x2F;1-Lectures-Contents.h...</a>
评论 #12852883 未加载
Tomteover 8 years ago
Another cool thing in Ada world: SPARK.<p><a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;SPARK_(programming_language)" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;SPARK_(programming_language)</a>
ar-nelsonover 8 years ago
This really makes me want to try Ada, if I could find a good fit for its low-level features (game development, maybe?)<p>The biggest thing that would make it annoying to write in is the verbose syntax--it&#x27;s like the worst of Java, VB, and Standard ML. And yet, that same verbosity makes it kind of nice to read.<p>I think there&#x27;s an inherent friction between &quot;write-friendly&quot; and &quot;read-friendly&quot; languages. It would be nice to have a language with a few different &quot;dialects&quot; (the way Ruby often has several equivalent ways to write certain constructs), such that a programmer could write the initial code in an extremely terse language, then run a formatter and get back a beautifully-formatted, much more verbose form of the same code.
评论 #12851642 未加载
tomrodover 8 years ago
I haven&#x27;t learned Ada yet, but I&#x27;ve heard praise and eulogies from HN a few times it has been mentioned in recent years.<p>At first pass, it appears to have a lot of unnecessary keywords, and the semicolon terminator (at first pass) seems arbitrarily required.<p>Is it really that great of a language? What does it provide that FORTRAN, C, and&#x2F;or Julia don&#x27;t provide in terms of speed, or Python in terms of readability?
评论 #12851607 未加载
评论 #12851912 未加载
cturnerover 8 years ago
Quick note others may find useful. I found this offputting: the idiomatic mixture of upper&#x2F;lower case and underscores in the syntax. Unnecessary cognitive overload. I&#x27;ve just done a quick test with current gnat and this works: you can just write everything in lower-case.
zemover 8 years ago
this is a really good feature that i&#x27;ve never seen elsewhere:<p>&gt; For extra robustness you can name blocks and use the name when closing them. In the above example, I could end the procedure with end Program.
didipover 8 years ago
So, the question I have is:<p>What is the OSS compiler for Ada that works on Linux and OS X?
评论 #12851833 未加载
评论 #12851654 未加载
Narishmaover 8 years ago
Needs a 2014 in the title.
评论 #12851298 未加载
评论 #12851291 未加载