Re: [MSEide-MSEgui-talk] MSElang Objects

2017-06-09 Thread Edson H
Yes, I like "proc" and "meth", because i like the short words.


I was thinking in using the two forms:


"proc" (short word) and "procedure" (long word).

"meth" (short word) and "method" (long word).


I would like to keep the PROCEDURE, in the honor of Pascal/Modula-2.


I'm not implementing objects by the moment, so I'm not using "method". But I 
have consider to use the "method" keyword too, before knowing about MSElang.


I think, people who is developing Pascal compilers, must talk in order to 
create compatible syntax, the most possible.



De: Martin Schreiber 
Enviado: sábado, 10 de junio de 2017 04:54 a.m.
Para: mseide-msegui-talk@lists.sourceforge.net
Asunto: Re: [MSEide-MSEgui-talk] MSElang Objects

On Saturday 10 June 2017 06:15:09 Edson H wrote:
> Hi Martin,
>
>
> I have seen you use "sub" for procedures or functions,  and "method" for
> object. Is it?
>
Yes.

> I think you can use only PROCEDURE keyword, for procedures and functions
> (and probably for objects), like Modula-2, do.
>
I don't like "sub" much but found nothing better up to now. I think that
object methods deserve an own token "method" because of the implicit "self"
parameter. Comming from a Pascal background "procedure" implies that there
must be a "function" too but there is none in MSElang. Maybe "proc" instead
of "sub" and "meth" instead of "method" what do you think?
"
proc test1(a: int32): flo64;
proc test2(const a: string8);
meth objty.test3(a: int32): flo64;
meth objty.test4(const a: string8);
meth ctest.test3(a: int32): flo64;
meth ctest.test4(const a: string8);
"
It has the advantage that procedure and method names are aligned. More
experiments are needed.


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


Re: [MSEide-MSEgui-talk] MSElang Objects

2017-06-09 Thread Martin Schreiber
On Saturday 10 June 2017 06:15:09 Edson H wrote:
> Hi Martin,
>
>
> I have seen you use "sub" for procedures or functions,  and "method" for
> object. Is it?
>
Yes.

> I think you can use only PROCEDURE keyword, for procedures and functions
> (and probably for objects), like Modula-2, do.
>
I don't like "sub" much but found nothing better up to now. I think that 
object methods deserve an own token "method" because of the implicit "self" 
parameter. Comming from a Pascal background "procedure" implies that there 
must be a "function" too but there is none in MSElang. Maybe "proc" instead 
of "sub" and "meth" instead of "method" what do you think?
"
proc test1(a: int32): flo64;
proc test2(const a: string8);
meth objty.test3(a: int32): flo64;
meth objty.test4(const a: string8);
meth ctest.test3(a: int32): flo64;
meth ctest.test4(const a: string8);
"
It has the advantage that procedure and method names are aligned. More 
experiments are needed.


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


Re: [MSEide-MSEgui-talk] MSElang Objects

2017-06-09 Thread Edson H
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 
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
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