🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Tangent: Constness

Published October 11, 2008
Advertisement
Tangent at last seems to have lost some steam. A distinct desire to play games and added workplace workload and a visit from the family have conspired to leave me with little time and motivation to work on the language. There's about a half dozen mildly hairy changes that should get done before the next release. The first I did manage to work on today.

The practical problem is that properties and other method groups are not so usable. They tend to come up with ambiguity errors when there shouldn't be. First step in fixing that is making normal methods not assignable. I had planned around making that just a type annotation. A type gets a token making it either const or a delegate (however the typing worked out to make things work like you'd expect), but it turns out things just don't work like that. The proper place to put a constness token is in the member definition (alongside the visibility level and 'virtual' token).

Unfortunately, that's a fairly major change since the member definition class touches a lot of places. And it broke some stuff. So next comes cleanup of that followed by more changes to get property = property to do the right thing (but allow actual property delegate assignment too).
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement