[Scummvm-devel] Re: [Scummvm-cvs-logs] CVS: scummvm/backends/dc dcmain.cpp,1.11,1.12

Marcus Comstedt marcus at mc.pp.se
Sun Jul 6 18:55:11 CEST 2003


Max Horn <max at quendi.de> writes:

> [...] In addition, this one is
> unambiguous, too:
> 
> OSystemSubclass::lock_mutex(MutexRef ref) {
> ...
> }
> Why? Because from the context it is clear that this lock_mutex is
> declared inside an OSystem subclass, so it is clear that MutexRef is
> really to OSystem:: MutexRef. But this one is not unambiguous:
> 
> MutexRef OSystemSubclass::create_mutex() {
> ...
> }
> It is not, because MutexRef is used *outside* any OSystem /
> OSystem-subclass scope. It comes before we enter that scope. Hence it
> can not be assumed to be the particular OSystem::MutexRef.

Having the declarations of formal parameters and return value in
different scopes is nothing short of broken.  You'll find _no_ other
language which does that...


  // Marcus






More information about the Scummvm-devel mailing list