Well, thanks for the documentation, the first article was quite interesting and I'm gonna get this book asap :)
When you execute a block (far away from the place it was created), it acts > as an exception, it stops the execution of currently executed methods and > return to its home context (method that led to the creation of the block) > Read deep into Pharo because this is a great chapter. > So people should avoid to put return statement into a block since a block > returns already the value of its last expression. > So for me > arg: [ ^ ... ] > > is a big warning. > Thanks for the explanation, I need to read this chapter, right :p By the way, I've always used return statements in blocks to "break" out of loops since i didn't find any "break" method in Pharo. Is that bad too ? 2015-07-03 10:11 GMT+02:00 Peter Uhnák <i.uh...@gmail.com>: > by the way > > >> nextOrNextAfterNext := stream next ifNil: [stream next]. >> > > I would argue that almost every person who would read this would think > it's a bug and it should be ifNotNil: > > Also there would be no point in saving it to a variable if you will just > return. > ^ stream next ifNil: [ stream next ] >