Re: New Language
- Posted by Mike Nelson <mikestar13 at sbcglobal.net> Sep 26, 2006
- 589 views
Mario Steele wrote: > Interesting design, very similar to the way Ruby does it's OOP design. I take > it the following definitions are: > > }}} <eucode> > method protected call_failed(Exception reason, string name, array parameters) > public integer locked > </eucode> {{{ > protected means that it can only be called within the Class itself, and public > integer means that it's an Instance Variable? > > I'd be interested in seeing how this language evolves, as I'd like to see > where > it goes from here. > Protected means callable from the class itself or a subclass; private speciefies callable from the class only. Methods may also use the "public" keyword, but methods are public by default. Instance variables are private by default; a public or protected designation autogenerates an accessor (get) method which has the same name as the variable and returns its value. Mutator (set) methods must be coded explicitly. So the above declaration is sytactic sugar for:
integer locked
method integer locked }}}