caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* why aren't methods visible inside class definition
@ 2004-12-25 18:23 briand
  2004-12-25 22:55 ` [Caml-list] " Jacques Garrigue
  0 siblings, 1 reply; 3+ messages in thread
From: briand @ 2004-12-25 18:23 UTC (permalink / raw)
  To: caml-list


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


Thanks


Brian


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] why aren't methods visible inside class definition
  2004-12-25 18:23 why aren't methods visible inside class definition briand
@ 2004-12-25 22:55 ` Jacques Garrigue
  2004-12-26  9:45   ` henri dubois-ferriere
  0 siblings, 1 reply; 3+ messages in thread
From: Jacques Garrigue @ 2004-12-25 22:55 UTC (permalink / raw)
  To: briand; +Cc: caml-list

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] why aren't methods visible inside class definition
  2004-12-25 22:55 ` [Caml-list] " Jacques Garrigue
@ 2004-12-26  9:45   ` henri dubois-ferriere
  0 siblings, 0 replies; 3+ messages in thread
From: henri dubois-ferriere @ 2004-12-26  9:45 UTC (permalink / raw)
  To: Jacques Garrigue; +Cc: briand, caml-list

> 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.

for a *value* (not field) and method i suppose 

henri


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-12-26  9:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-25 18:23 why aren't methods visible inside class definition briand
2004-12-25 22:55 ` [Caml-list] " Jacques Garrigue
2004-12-26  9:45   ` henri dubois-ferriere

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).