instanceTalebles in traits smalltalk

Jas*_*ack 4 smalltalk traits pharo

在Pharo Smalltalk中使用特征时是否可以使用instanceVariables?

Trait named: #Personnel
uses:{}
category: 'Test'
Run Code Online (Sandbox Code Playgroud)

我想添加一些其他类可以从这些特征中使用的变量.这在Smalltalk中是否可行?

Est*_*nLM 9

不是.特征是无状态可组合单元,它们用简单的方式表示:没有属性,只有方法.

有关更详细的说明,请查看:http://scg.unibe.ch/archive/papers/Scha03aTraits.pdf