Is having a dedicated fn keyword necessary? I mean, what’s the fundamental difference between a func and a fn ?
doTexture(myTexture, ['op1', 'op0', 'opR'])
and let doTexture handle each cases(ops), might be able to achieve the same behavior, right? function doTexture(texture, fn) {
beginTextureMode(texture)
fn()
endTextureMode()
}
doTexture(myTexture, () => {
drawCircle()
drawRectagle()
})
At the cost of being more verbose, we get the benefit of one thing less to learn; and simplicity is a powerful feature IMO. 1. macro
2. callback functions introduce more indent levels :(