Talk:Ada (programming language)

This is an old revision of this page, as edited by GreenWeasel11 (talk | contribs) at 03:35, 15 December 2020 ("Safe modular programming": Reply, very late). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Latest comment: 4 years ago by GreenWeasel11 in topic "Safe modular programming"

Template:Vital article

Hello fellow Wikipedians,

I have just modified 5 external links on Ada (programming language). Please take a moment to review my edit. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit this simple FaQ for additional information. I made the following changes:

When you have finished reviewing my changes, you may follow the instructions on the template below to fix any issues with the URLs.

This message was posted before February 2018. After February 2018, "External links modified" talk page sections are no longer generated or monitored by InternetArchiveBot. No special action is required regarding these talk page notices, other than regular verification using the archive tool instructions below. Editors have permission to delete these "External links modified" talk page sections if they want to de-clutter talk pages, but see the RfC before doing mass systematic removals. This message is updated dynamically through the template {{source check}} (last update: 5 June 2024).

  • If you have discovered URLs which were erroneously considered dead by the bot, you can report them with this tool.
  • If you found an error with any archives or the URLs themselves, you can fix them with this tool.

Cheers.—InternetArchiveBot (Report bug) 09:17, 26 June 2017 (UTC)Reply

Hello fellow Wikipedians,

I have just modified one external link on Ada (programming language). Please take a moment to review my edit. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit this simple FaQ for additional information. I made the following changes:

When you have finished reviewing my changes, you may follow the instructions on the template below to fix any issues with the URLs.

This message was posted before February 2018. After February 2018, "External links modified" talk page sections are no longer generated or monitored by InternetArchiveBot. No special action is required regarding these talk page notices, other than regular verification using the archive tool instructions below. Editors have permission to delete these "External links modified" talk page sections if they want to de-clutter talk pages, but see the RfC before doing mass systematic removals. This message is updated dynamically through the template {{source check}} (last update: 5 June 2024).

  • If you have discovered URLs which were erroneously considered dead by the bot, you can report them with this tool.
  • If you found an error with any archives or the URLs themselves, you can fix them with this tool.

Cheers.—InternetArchiveBot (Report bug) 05:23, 26 July 2017 (UTC)Reply

Comments and end of line

"Comments stop at end of line, so there is no danger of unclosed comments accidentally voiding whole sections of source code."

This is actually more dangerous than explicit closing when you use UTF-8 encoding. For example, if the last character on the comment line is a 'é' (e with acute accent), and if the source parser is miss-configured and thinks the encoding is a one-byte encoding (e.g. ISO-8859-1) rather than UTF-8, then the compiler won't see the end of line and treat the next line of code following the comment as a continuation of the comment. So one line of code won't be executed! Bohan (talk) 15:32, 21 January 2018 (UTC)Reply

Most of the section concerning comments is poorly worded, IMO. Parts of it are obviously incorrect. For example, how can one line comments be nested??? 207.225.245.125 (talk) 05:55, 4 March 2018 (UTC)Reply
You can nest single-line comments by adding a comment marker to the start of the line, so you can comment out lines without worrying about existing comments.
If you're feeding the wrong encoding into your compiler, there's your bug. I don't know how a trailing é (in UTF-8 16#c3# 16#a9#, or misinterpreted as Latin-1, "é") could cause the compiler to not see the end of line, though.--Prosfilaes (talk) 06:48, 4 March 2018 (UTC)Reply
I guess it depends on how "nesting" is defined. I believe it is defined as a block comment within a block comment. While I see your point that an end-of-line comment can be within an end-of-line comment, I have never seen (except in this article) that called "nesting". IMO, the article should just say "Ada has end-of-line comments, started with --, and was intentionally designed not to use block comments", or equivalent wording, and give an example of an Ada comment. All the other text concerning Ada comments (eg, "designed to resemble the English language") is verbiage, IMO. 207.225.245.125 (talk) 17:41, 4 March 2018 (UTC)Reply

Double-dash? or double-hypen?

The article reads:

A double-dash ("--"), resembling an em dash, denotes comment text.

I suspect that "double-dash" is incorrect, with the correct statement being "double-hyphen".

But I'm not sure, so I will leave this for someone else.

Karl gregory jones (talk) 17:04, 26 September 2018 (UTC)Reply

It's a hyphen-minus, to give it its Unicode name. It is the one and only ASCII character to be a horizontal line at x-height in the character cell. It is the dash in ASCII, among its multitude of duties.--Prosfilaes (talk) 04:17, 28 September 2018 (UTC)Reply

"Safe modular programming"

The first sentence of the "History" section ends with a rather vague (IMO) reference to "safe modular programming". This phrase doubtless means something definite to someone somewhere, but I find it unclear—and I have a degree in computer science, so I imagine the two adjectives in front of "programming" convey virtually no useful information to a casual reader.

A Google search for the three-word phrase in question, in quotes, turns up 1,660 results, and it seems like they're mostly direct quotes of this article, which strikes me as problematic. I can guess pretty well what "modular programming" means (I mean, there's an article about it, and of course I know what modularity is, so that's a reasonable term to use), but "safe" is a bit of a weasel word. Without a link to an article describing a specific kind of safety (like how "safe" links to the article on type safety in the infobox), it's hard to know which, or how many, of the meanings of the word are intended. Was the problem that some of the languages then in use supported modular programming, and some supported safe (whatever that means) programming, but none supported safe, modular programming? Or were all languages both unsafe and non-modular? Or something else entirely?

All of that to say: it would be great if someone who knows more about the history of programming languages than I could clarify what "safe" means in this context.

I'm probably making too much of a fuss about a single word, but it strikes me as a deficiency in the article, so I think it should either be fixed somehow or someone should explain why it's not actually a problem.

GreenWeasel11 (talk) 08:11, 18 November 2020 (UTC)Reply

I don't have sources, but I remember proponents of Ada stating it aimed to make programming more safe, meaning tending to produce fewer or less severe bugs, especially for large projects. Features supporting this focused on inter-module programming constructs, where other languages, like C, could be weak in detecting certain kinds of bugs. So, it's not really a "weasel" word, but I'd say it's subjective at best, and may only be theoretical. In my experience, although Ada did have features that purported to address some things around this, other contemporary languages and code-checking tools did as well or better with less awkwardness.
In summary, I'd say it's okay to keep if sourced. Otherwise, it should go. --A D Monroe III(talk) 02:51, 21 November 2020 (UTC)Reply
Good point. I tend to use terms to mean what I want them to mean rather than what they're commonly accepted to mean—so if "weasel word" connotes intent to mislead as Google's dictionary says, then I should have just said "ambiguous". But anyway, it just seems shady to make the sweeping statement that no language the DoD used supported this way of programming and then not indicate precisely what features they lacked that made them un"safe". Oh well. It's not terribly important anyway. I do find it disturbing that there are so many instances online of people parroting this phrase when each person who reads it probably has a slightly different idea of what it's supposed to mean. —GreenWeasel11 (talk) 03:34, 15 December 2020 (UTC)Reply