▲ | ivanjermakov a day ago | ||||||||||||||||
The drawback is that this approach elevates code blocks to first class. It means that there is a semantical difference between a value that is a block and a value that is a result of a block. This reduces code clarity, because now block def/result is discriminated by context instead of syntax. - closures get tricky, i.e. having outer scoped variables within a block - inter-block operators still need special care, e.g. return should return from a function or a nearest block, same for break/continue/etc. | |||||||||||||||||
▲ | danlitt 21 hours ago | parent [-] | ||||||||||||||||
This criticism seems at face value to also apply to first-class functions, which I thought was a totally uncontroversial pattern. Do you dislike those too? | |||||||||||||||||
|