Porting Squeak
Todd Blanchard
todd.blanchard at cacheon.com
Thu Jan 10 17:43:16 UTC 2002
From: Bijan Parsia [mailto:bparsia at email.unc.edu]
Since I think there's a lot of juice to be gotten out of optional type
annotations, I'd be interested in how folks like the Bistro way of doing
it.
-------------
That's how ObjectiveC works.
You can declare a variable as a typed pointer or id.
If you declare it as id, the compiler makes no assumptions about what id
references and it works like a smalltalk variable.
If you use a typed pointer, you will get a warning when you write code
that tries to send a message not supported by the class. Its only a
warning so it never gets in your way, yet it can be handy for spotting
typos before running the code.
I rather like it.
More information about the Squeak-dev
mailing list
|