I think those tags are basically the same. So they should be synonyms, or merged, or something:
assert: 1,087 questions
An assertion is a statement, which aborts a program when it evaluates to false. Assert is typically used for debugging and situations which should never happen.
assertion: 322 questions
An assertion is a software construct where the developer states ("asserts") a condition that he believes will always be true. If the condition evaluates to false an exception is generated.
assertions: 444 questions
Assertion is a method of verifying, if the code works as it was designed to. For instance, after reading an XML file, the result should contain exactly one root node. Failed assertion means, that program is in an unstable state and usually in such case its execution is terminated.
But I don't have enough score in those tags, so I can't suggest them as synonyms.
Note I don't usually use assertions, so maybe I am wrong and there is some difference I don't see. But then tag descriptions should be edited to make it clearer.
- 2I'm confused about the "I don't have enough score" bit. You can create tag synonyms at 2500 rep.Tom Fenech– Tom Fenech2015-03-28 17:26:01 +00:00CommentedMar 28, 2015 at 17:26
- 25@TomFenech I get "Creating a tag synonym requires 5 score in this tag".Oriol– Oriol2015-03-28 17:35:58 +00:00CommentedMar 28, 2015 at 17:35
- 8Although, it is the least used one, I think [assertion] should be the main tag.Artjom B.– Artjom B.2015-03-28 17:41:50 +00:00CommentedMar 28, 2015 at 17:41
- @PierreArlaud: That's more of a regex question than a Python question, but anyway, it checks whether
test_stringconsists of 3 digits, a hyphen, and 4 more digits. Sounds like an attempt to determine whethertest_stringis a phone number.user2357112– user23571122015-03-29 18:59:25 +00:00CommentedMar 29, 2015 at 18:59 - 2@PierreArlaud How is your question related to this thread?Oriol– Oriol2015-03-29 19:00:48 +00:00CommentedMar 29, 2015 at 19:00
- 2@Oriol Perhaps Pierre was (for reasons unknown) suggesting that Python is not in fact the same as English.JLRishe– JLRishe2015-03-29 20:20:45 +00:00CommentedMar 29, 2015 at 20:20
- @JLRishe Thanks for your support (for reasons unknown). English, like any human language (no, Lojban doesn't count) is too ambiguous to be used in computer theory. Doesn't make Python a bad language though :-)Pierre Arlaud– Pierre Arlaud2015-03-29 20:46:25 +00:00CommentedMar 29, 2015 at 20:46
- Where did these definitions come from?Robert– Robert2015-03-30 00:41:09 +00:00CommentedMar 30, 2015 at 0:41
- @topdizel Those are the tag excerpts.Oriol– Oriol2015-03-30 00:48:03 +00:00CommentedMar 30, 2015 at 0:48
- 3The expression in the title would not compile because you can't compare the types bool and tag.usr– usr2015-03-30 09:05:56 +00:00CommentedMar 30, 2015 at 9:05
- @usr Only in some languages. In others, it just returns false. (In fact, it's probably an error because of the brackets, not because of the comparisons)Stack Exchange Broke The Law– Stack Exchange Broke The Law2015-03-30 09:26:05 +00:00CommentedMar 30, 2015 at 9:26
- 3It has been over a year since the last comment and all three tags still exist. Unless I missed something, it looks like the conciseness is to merge (at least two of them, and improve the name of the other if kept separate). Is there a reason why nothing has happened?Greg– Greg2016-11-08 20:05:16 +00:00CommentedNov 8, 2016 at 20:05
2 Answers2
There are two concepts here. On one hand there are "assert commands" (or "assert statements" if you prefer) such as are found in Euclid, Java, and Eiffel. These are commands in an imperative language. Closely related is C's "assert macro" and "assert" subroutines found in lots of libraries. These assert commands, macros, and subroutines are used for run-time checking.
On the other hand there are "assertions" which are used in design and analysis techniques pioneered by Floyd and Hoare, with some earlier work by Turing and Naur. Assertions in this sense are used either to guide the design or to analyze a design to see whether it is correct or not (i.e. for verification). The use of assertions in this sense does not imply any run-time checking, though it doesn't preclude it either.
From the tag descriptions, it seems thatassert andassertion are being used in the first sense whileassertions is used in the second sense.
- 7That said, almost all recent traffic on
assertionsis about "assert commands" and the like.Theodore Norvell– Theodore Norvell2015-03-30 01:18:11 +00:00CommentedMar 30, 2015 at 1:18 - 13I don't like that kind of subtle distinction. If we're going to have a tag for "design assertions", we should retag them e.g.
design-assertionsand synonym/merge the three tags OP mentioned.Kevin– Kevin2015-03-30 22:52:52 +00:00CommentedMar 30, 2015 at 22:52 - 1Currently
assertionsis a synonym forassertionbutassertandassertionsomehow still remain distinct.jamesdlin– jamesdlin2020-04-15 05:30:35 +00:00CommentedApr 15, 2020 at 5:30
I also think they must be made synonyms. Currentlyassertions has been made synonymous toassertion so it couldn't be used for Floyd and Hoare's design technique.assert should now also be made a synonym ofassertion
Some new tags must be created for Floyd–Hoare logic's assertions with a proper name and wiki
- 2If you know of questions which need a tag regarding the Floyd-Hoare thing, you have more than sufficient rep to create a tag... I would suggest [hoare-logic] as that seems to be whatWikipedia landed on but I know nothing about the subject.Heretic Monkey– Heretic Monkey2020-10-16 13:57:12 +00:00CommentedOct 16, 2020 at 13:57
You mustlog in to answer this question.
Explore related questions
See similar questions with these tags.

