What options do we have in terms of type annotations in Pharo?
which enabled type annotation for Squeak such as
~~~~~~~~~~~~~~~~
Fruit>>mixWith: aFruit <:type: Fruit :>
�� �� ^ (Array with: self with: aFruit) <:type: Array E: Fruit :>
~~~~~~~~~~~~~~~~
Orange>>color
�� �� ^ (Color orange) <:type: Color :>
~~~~~~~~~~~~~~~~
(or even blocks)
[ :a1 <:type: Integer :> :a2 <:type: Integer :> | a1 + a2 ]
~~~~~~~~~~~~~~~~
obviously something like this wouldn't even compile in Pharo (does Sqeak have different syntax for pragmas, or did the TypePlug change the syntax?)
And my question is... is there a port of this, or something similar?
Which is a framework for integrated testing that uses pragmas such as
~~~~~~~~~~~~~~~~
makeBatchWithdrawalOn: aDate note: aString
�� <fitTakes: #(#{Date} #{String})>
�� <fitReturns: #{Fixture}>
�� ^(BatchWithdrawalFixture date: aDate note: aString)
�� �� �� systemUnderTest: systemUnderTest
~~~~~~~~~~~~~~~~
Right now I am exploring what options we have in Pharo in terms of type annotations (before writing yet-another-library ;-)).
Thanks,
Peter