对象与块
Object vs Block
我正在构建一个模型来显示 UI 在 Rebol3 上使用 SDL2。
到目前为止,我想做这样的事情:
gui: copy []
append gui context [style: 'h1 at: 10x30 text: "Hello World!" font: arial]
但是我应该使用 Object!当我只需要一个块!像这样:
gui: copy []
append/only gui reduce/no-set [style: 'h1 at: 10x30 text: "Hello World!" font: arial]
你对此有何看法?什么最好用?还有其他建议吗?
为什么不是方言?
[h1 10x30 "Hello World!" font arial]
在内部我会将它存储为一个 对象!,因为它为您提供了更容易的操作。
我正在构建一个模型来显示 UI 在 Rebol3 上使用 SDL2。
到目前为止,我想做这样的事情:
gui: copy []
append gui context [style: 'h1 at: 10x30 text: "Hello World!" font: arial]
但是我应该使用 Object!当我只需要一个块!像这样:
gui: copy []
append/only gui reduce/no-set [style: 'h1 at: 10x30 text: "Hello World!" font: arial]
你对此有何看法?什么最好用?还有其他建议吗?
为什么不是方言?
[h1 10x30 "Hello World!" font arial]
在内部我会将它存储为一个 对象!,因为它为您提供了更容易的操作。