overloading (assignment) operators
28 Feb
2020
28 Feb
'20
2:12 p.m.
Hi all, I think I know the answer, but I'd like to ask the question anyway since it could trigger interesting discussions. Is it possible to overload operators in ChucK? I was thinking about having something like the following: private class PInt { 0 => int value; function void __chuck__ (int x) // or PInt operator=> (int x) { x => this.value; } } so that then, assuming I have a PInt instance MyInt, I can just do something like that: 12 => MyInt; Cheers, Mario -- electronic musician, sound artist, creative coder, QA engineer https://vimeo.com/creativecodingsalerno http://mbuoninfante.tumblr.com/ https://github.com/mariobuoninfante https://bitbucket.org/mariobuoninfante/
1687
Age (days ago)
1687
Last active (days ago)
0 comments
1 participants
participants (1)
-
mario buoninfante