0

In software development there are code loop constructions, which you can BREAK.

foreach(i in integers)
  ...
  break

If I break the cycle, it becomes broken or breaked?

Which sentence is correct in this context: loop is broken or loop is breaked? It is important to distinguish between broken as incorrect one and broken as interrupted.

choster
  • 43,403
TOP KEK
  • 151
  • 4
    Just anecdotal evidence, but in decades of programming C-like languages, I've never used or seen "breaked". – user888379 Feb 06 '18 at 14:42
  • 4
    I wouldn't say you have broken the loop, but that you have broken out of the loop. This disambiguates it from the other sense of broken. – JonLarby Feb 06 '18 at 15:03
  • 3
    We’d normally use exited or terminated, rather than a past tense of break. – Lawrence Feb 06 '18 at 15:03
  • 2
    Program execution tend to be described dynamically. A 'break' statement is a command with results. The past participle that usually attends the 'break' statement is 'interrupted': "The for loop was interrupted by the break statement". 'Broken' is a static thing. "The for loop is broken because of the syntax error" – Mitch Feb 06 '18 at 15:03
  • To echo JonLarby and Lawrence, because programmers otherwise describe code as broken (meaning: not working) you'd tend to use broken out of or exited (the loop). – TripeHound Feb 06 '18 at 15:14
  • Please include the research you’ve done. Questions that can be answered using commonly-available references are off-topic. Do any dictionaries use the traditionally unacceptable past simple 'breaked' in this sense? – Edwin Ashworth Feb 06 '18 at 15:26
  • @All It is insufficient to give an answer here giving an unsupported 'breaked is wrong'. The answers to the question When and why is 'flied' used as the past tense of 'fly' show that regularisation of irregular verbs is not unknown. – Edwin Ashworth Feb 06 '18 at 15:33
  • 1
    I'm voting to close this question as off-topic because it belongs on a programming site, as the question is specific to that domain. in that rather isolated domain, otherwise irregular words such as 'breaked' might prove acceptable. – Arm the good guys in America Feb 06 '18 at 17:00
  • I can not ask grammar questions on stackoverflow – TOP KEK Feb 06 '18 at 18:31
  • Clarity in explaining algorithms is one of the more pressing issues of our time. My vote is to keep this question open, and to encourage more like it. –  Feb 07 '18 at 16:46

2 Answers2

0

Break is an irregular verb, so we have break - broke (past) - broken (past participle)

P.S. I've never heard or seen "breaked" ). But you can try to use this word as a joke ("savvy" - Jack Sparrow)

0

The best way to describe a computer program depends on the level you want to speak at, e.g.

  • The result is found.
  • The iteration terminates.
  • The loop is exited.
  • The interpreter executes the break statement.
  • The processor branches, and so on.

The problem with words like break is that they aren’t strongly associated with any particular level, and they have larger meanings, e.g. a broken loop can be one that does not implement the programmer’s original intention. However, the designer of a programming language naturally wants to use words that have meaning to humans, and sometimes this can be misleading. When, for example, was the last time you saw a print statement causing something to appear on a physical printer?

  • Yeah, I think it is better to correct wording and make the loop "cancelled" or "interrrupted" – TOP KEK Feb 07 '18 at 12:48
  • In choosing words to describe a computer program, it’s worth remembering that all automated processes can be modeled as finite state machines. Sometimes, you want to talk about the state transition in terms of structures. At other times, you want to talk about how the program moves through a sequence of states. IMHO, terms like loop pose a challenge, since it’s a structural term (a noun) that can also be used as a verb to describe an action, i.e. looping. So when you use it, you can slip from one mode of description to another, and therefore find the next word hard to think of. –  Feb 07 '18 at 16:41