Re: Methods vs. ROUTES

Park SungWoo (gladius@compiler.kaist.ac.kr)
Wed, 9 Apr 1997 23:07:17 +0900 (KST)

>
> IN OOVRML you would write
>
> DEF CLOCK TimeSensor { }
>
> TouchSensor { touchTime CLOCK.startTime }
>
> Why don't you write:
>
> DEF TOUCH TouchSensor { }
>
> TimeSensor { startTime TOUCH.touchTime }
>
> The later would be close to calling the method "touchTime"
> of the object TOUCH and use its value. The difference to
> a method call in a programming language is, that this
> is a "permanent" call. Whenever touchTime changes its
> value so does startTime.
>
> What I'd like this discussion to lead to, is a syntax
> for methods with parameters which can be translated
> into ROUTES and Scripts.
>
> Cheers
> --Stephan
>

I thought enumerating eventIns in an eventOut is more natural than
your suggestion.
For example, in C++, you would write as:

// in object P
void f(int x)
{
}

// in object Q
int y;
...
P.f(y); // method invocation

The following pseudo code is ,I think, awkward.

// in object P
void f(int Q.y)
{
}

// in object Q
int y;
...
y = 3; // automatic method invocation

I want to hear about the basic idea of you suggestion.

Thank you.

-- 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 Sungwoo Park, (Castle-Help Naive)
	homepage : http://compiler.kaist.ac.kr/~gladius
 	e-mail : gladius@compiler.kaist.ac.kr
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -