Can I implement coroutines in smalltalk?
If your answer is no: why not?
Or if its yes: can you give me an example?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Most Smalltalk have stack manipulation methods on the thisContext object. You could use these to implement coroutines though dealing with the stack at this level may prove a bit tedious.
GNU Smalltalk and recent versions of Squeak and Pharo also offer a Generator class that makes it easy to write generators (i.e. types of coroutine that yield multiple values):