Hallo Martin,

Du schriebst am Tue, 13 Jun 2017 06:47:58 +0200:

> > [functions & procedures]
> IIRC you proposed to use "function" for both? Sometimes I have the

No. I did propose to use "function" _only_ if you _insisted_ to use the
same keyword for both uses. If you kept the Pascal convention, only the
better, I will _not_ protest.

["of object"]
> I probably understand wrong, but do "SomeObjectMethod" 
> and "SomeMethodVariable" work with "SomeObject" only? That's not how
> Delphi and MSElang method variables work.

A method variable requires a specific "signature", i.e. parameter list,
which belongs to a method of some specific object type. But I see your case
- for commonly occurring signatures it might be desirable to define such
variables independently of the destination type.
On the other hand, I would really prefer some other syntax than this
appendix, something more in line with the object declaration syntax.
Even the Delphi creators themselves seem not to be happy with it, since
they invented a completely different way for their later introduced "class
methods".
Using this as a reference, a syntax like

  MethodType = object function (<parameterlist): <result type>;
or
  MethodVariable: object function (<parameterlist): <result type>;

might be considered. Yes, this is more typing.
(Perhaps abbreviate it with just usind a (leading) period? Like
 ".function (<parameterlist): <result type>;" Nay, too C-ish...)

> > [WITH]
> > > MSElang provides a safe "with" statement with mandatory local
> > > qualifier.  
> >
> > Something like the "Modula" version?
> > I.e. effectively variable (object) renaming, without opening a new
> > scope?  
> 
> Yes.

[Pascal-ish "with"]
> The problem is that if there are members added to the referenced "with" 
> container they override elements with the same name and type in existing 
> code.

Only if not explicitely qualified - you can always "break out" of the
current scope using qualifiers. For the current object, the qualifier
is always "self". And for elements outside of any object context, it is the
unit name. What's your problem then? and how should the Modula variant be
better in that respect?

> > > [...]
> > > > > It has the advantage that procedure and method names are aligned.
> > > > > More  
> > > >
> > > > That _might_ be a disadvantage at times, as it might make reading
> > > > the source text more difficult.  
> > >
> > > Please explain.  
> >
> > Citing you in
...
> > It looks ugly.
> > "
> > You said.
> >  
> That's not "it might make reading the source text more difficult".

Yes, it is. When something "looks ugly" on first sight, it already _has_
distracted you from understanding what it _means_. You have to concentrate
on the text explicitely to understand it, may be have to read it again. 
And above that, reading a, possibly long, list of all similar looking
lines, it is not so easy to spot changes in those neatly aligned parts.
(Which might be the reason that it "looks ugly".)

-- 
-- 
(Weitergabe von Adressdaten, Telefonnummern u.ä. ohne Zustimmung
nicht gestattet, ebenso Zusendung von Werbung oder ähnlichem)
-----------------------------------------------------------
Mit freundlichen Grüßen, S. Schicktanz
-----------------------------------------------------------



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