Subroutine vs Coroutine - What's the difference?
subroutine | coroutine | Hyponyms |
(computer science) A section of code, called by the main body of a program, that implements a task.
(programming) A piece of code that performs a task, and that can be passed new input and return output more than once.
Coroutine is a hyponym of subroutine.
As nouns the difference between subroutine and coroutine
is that subroutine is a section of code, called by the main body of a program, that implements a task while coroutine is a piece of code that performs a task, and that can be passed new input and return output more than once.subroutine
English
Noun
(wikipedia subroutine) (en noun)coroutine
English
Alternative forms
* co-routineNoun
(en noun)- Although a powerful tool, coroutines can be hard to understand due to the way data can flow back and forth between sections of the code.
