On Saturday 10 June 2017 18:45:34 Marcos Douglas B. Santos wrote:
> My "vote" is to use "function" anywhere.
>
> You've said:
> > ...object methods deserve an own token "method" because of the implicit
> > "self" parameter.
>
> But the object itself is a context to the functions (methods) so, I
> can't see any problems.
>
I like
"
var
 meth1: method(a,b: int32);
"
more than
"
var
 meth1: procedure(a,b: int32) of object;
"

> About the procedures vs functions vs "sub"... well, as I've said, just
> use "function".
> If you have a return, use the same as Pascal:
> function Foo: Boolean;
>
> If you don't have a return, don't write the last part:
> function Foo;
>
> IMHO a function that doesn't have a return — doesn't matter if is a
> method or a "sub" — isn't a good design.

Agreed, a "function" should return a value. Because MSElang subroutines return 
a value only if it is useful they should not be named "function".

> You need to have a return. If you have a object with a method "exec",
> eg, why not return the object itself? Just return something.

Why?

Martin

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

Reply via email to