Hi Martin,

I have seen you use "sub" for procedures or functions,  and "method" for 
object. Is it?

I think you can use only PROCEDURE keyword, for procedures and functions (and 
probably for objects), like Modula-2, do.

I'm implementing functions in my compiler, and I think, it's better to use 
"sub" too, but in the other hand, I don't want to break to much the Pascal 
compatibility.


________________________________
De: Martin Schreiber <mse00...@gmail.com>
Enviado: domingo, 07 de mayo de 2017 09:41 a.m.
Para: mseide-msegui-talk@lists.sourceforge.net
Asunto: Re: [MSEide-MSEgui-talk] MSElang Objects

On Sunday 07 May 2017 11:10:48 code dz wrote:
> btw the keyword (method) looks weird  , (sub) is much better or
> typical pascal (procedure , function) . its only my opinion ;)
>
I wanted to remove the distinction between "procedure" and "function",
so "sub". Object procedures and functions have an implicit data pointer
parameter ("self") so I thought that an own name ("method") is justified.

> also the attribuates mechanism really looks cool .
>
I plan to use method attributes for operator overloading too:
"
type
 complexty = object
  real,imm: flo64;
  method add(const a,b: complexty): complexty ['+'];
  method sub(const a,b: complexty): complexty ['-'];
  method mul(const a,b: complexty): complexty ['*'];
  method tostring8(const source: complexty): string8 [':='];
 end;
"

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
mseide-msegui-talk Info Page - 
SourceForge<https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk>
lists.sourceforge.net
mseide-msegui-talk -- General list for MSEide+MSEgui About mseide-msegui-talk


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