79

I think those tags are basically the same. So they should be synonyms, or merged, or something:

  • : 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.

  • : 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.

  • : 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.

askedMar 28, 2015 at 0:48
Oriol's user avatar
12
  • 2
    I'm confused about the "I don't have enough score" bit. You can create tag synonyms at 2500 rep.CommentedMar 28, 2015 at 17:26
  • 25
    @TomFenech I get "Creating a tag synonym requires 5 score in this tag".CommentedMar 28, 2015 at 17:35
  • 8
    Although, it is the least used one, I think [assertion] should be the main tag.CommentedMar 28, 2015 at 17:41
  • @PierreArlaud: That's more of a regex question than a Python question, but anyway, it checks whethertest_string consists of 3 digits, a hyphen, and 4 more digits. Sounds like an attempt to determine whethertest_string is a phone number.CommentedMar 29, 2015 at 18:59
  • 2
    @PierreArlaud How is your question related to this thread?CommentedMar 29, 2015 at 19:00
  • 2
    @Oriol Perhaps Pierre was (for reasons unknown) suggesting that Python is not in fact the same as English.CommentedMar 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 :-)CommentedMar 29, 2015 at 20:46
  • Where did these definitions come from?CommentedMar 30, 2015 at 0:41
  • @topdizel Those are the tag excerpts.CommentedMar 30, 2015 at 0:48
  • 3
    The expression in the title would not compile because you can't compare the types bool and tag.CommentedMar 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)CommentedMar 30, 2015 at 9:26
  • 3
    It 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?CommentedNov 8, 2016 at 20:05

2 Answers2

9

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.

answeredMar 30, 2015 at 1:02
Theodore Norvell's user avatar
3
  • 7
    That said, almost all recent traffic onassertions is about "assert commands" and the like.CommentedMar 30, 2015 at 1:18
  • 13
    I 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-assertions and synonym/merge the three tags OP mentioned.CommentedMar 30, 2015 at 22:52
  • 1
    Currentlyassertions is a synonym forassertion butassert andassertion somehow still remain distinct.CommentedApr 15, 2020 at 5:30
3

I also think they must be made synonyms. Currently has been made synonymous to so it couldn't be used for Floyd and Hoare's design technique. should now also be made a synonym of

Some new tags must be created for Floyd–Hoare logic's assertions with a proper name and wiki

answeredOct 16, 2020 at 3:01
phuclv's user avatar
1
  • 2
    If 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.CommentedOct 16, 2020 at 13:57

You mustlog in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.