[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2004-12-25 (22:55) |
From: | Jacques Garrigue <garrigue@m...> |
Subject: | Re: [Caml-list] why aren't methods visible inside class definition |
From: briand@aracnet.com > Any particular reason for this ? > > After all values are visible so why aren't methods simply treated as > values which are functions and therefore visible also. > > By visible, I mean that methods can nly be accessed using self#method_name Methods are seen as similar to records fields, so you must be explicit about the object when calling them. Also, methods may have no arguments, while functions must have at least one. Last, this distinction lets you use the same name for a field and a method. This is sometimes comfortable. Jacques Garrigue