Am 29.05.2017 10:26 schrieb "Ryan Joseph" :
>
>
> > On May 29, 2017, at 1:01 PM, Sven Barth via fpc-pascal <
fpc-pascal@lists.freepascal.org> wrote:
> >
> > If anything like this would be implemented, then the already existing
syntax (for variant dispatch calls) would be used which uses ":=".
> >
>
On 29/05/17 05:15, Ryan Joseph wrote:
On May 28, 2017, at 5:22 PM, Mark Morgan Lloyd wrote:> >> IMO
though it does improve readability in long functions with lots of>> parameters, like windows api style
procedures that have 5 or more>> parameters and you can't figure out which param is>> which
> On May 29, 2017, at 1:01 PM, Sven Barth via fpc-pascal
> wrote:
>
> If anything like this would be implemented, then the already existing syntax
> (for variant dispatch calls) would be used which uses ":=".
>
>
What are variant dispatch calls? Maybe something from Delphi I’m not familiar
Am 29.05.2017 07:13 schrieb "Ryan Joseph" :
>
>
> > On May 28, 2017, at 5:22 PM, Mark Morgan Lloyd <
markmll.fpc-pas...@telemetry.co.uk> wrote:
> >
> >> IMO though it does improve readability in long functions with lots of
> >> parameters, like windows api style procedures that have 5 or more
> >>
> On May 28, 2017, at 5:22 PM, Mark Morgan Lloyd
> wrote:
>
>> IMO though it does improve readability in long functions with lots of
>> parameters, like windows api style procedures that have 5 or more
>> parameters and you can't figure out which param is
>> which
>
You mean like this?
funct
In our previous episode, Bernd Oppolzer said:
> IMO, it's not about named parameters;
> furthermore, it is not about readability, but this IMO
> is a maintenance issue.
>
> Think about a procedure that has two parameters and a lot of callers
> and you want to add a third one.
>
> it would be nice
On 27/05/17 20:30, nore...@z505.com wrote:
IMO though it does improve readability in long functions with lots of
parameters, like windows api style procedures that have 5 or more
parameters and you can't figure out which param is
which
I had an interesting case a couple of years ago where a pr
On 27/05/17 11:26, Bernd Oppolzer wrote:
> it would be nice if you could specify a default value for the new
> third parameter and don't have to change all the callers that use
> only two.
>
[snip]
> procecure P (x : integer; y : boolean; c: char := ' ');
>
> the first two parameters are mandator
On 2017-05-27 21:14, nore...@z505.com wrote:
f(p3 := true);
;
You can do something similar already with source comments
SomeProc(true {p3})
That will not work. p3 in his example is the 3rd parameter. You are only
passing one parameter, so that will then become p1's value. And if the
types d
On 2017-05-27 01:17, Mr Bee via fpc-pascal wrote:
Hi,
As Pascal mostly well known as a safe, easy to read, and elegant
language, don't you think Pascal needs named parameter? I mean for ALL
kind of parameters, not just for Variants. When you have a function
with many parameters having default va
2017-05-27 16:12 GMT+02:00 Michael Van Canneyt :
>
>
> On Sat, 27 May 2017, Sven Barth via fpc-pascal wrote:
>
>> 2017-05-27 9:54 GMT+02:00 Michael Van Canneyt :
>>>
>>>
>>>
>>> On Sat, 27 May 2017, Mr Bee via fpc-pascal wrote:
>>>
Hi,
As Pascal mostly well known as a safe, easy to r
On Sat, 27 May 2017, Sven Barth via fpc-pascal wrote:
2017-05-27 9:54 GMT+02:00 Michael Van Canneyt :
On Sat, 27 May 2017, Mr Bee via fpc-pascal wrote:
Hi,
As Pascal mostly well known as a safe, easy to read, and elegant language,
don't you think Pascal needs named parameter? I mean for
2017-05-27 9:54 GMT+02:00 Michael Van Canneyt :
>
>
> On Sat, 27 May 2017, Mr Bee via fpc-pascal wrote:
>
>> Hi,
>>
>> As Pascal mostly well known as a safe, easy to read, and elegant language,
>> don't you think Pascal needs named parameter? I mean for ALL kind of
>> parameters, not just for Varia
> On May 27, 2017, at 5:29 PM, Mark Morgan Lloyd
> wrote:
>
> I was on the periphery of that discussion, since I thought I needed something
> similar (but turned out not to). But you might have noticed some of the
> APLisms that I horrify Sven with on occasion...
I remember he liked my idea
On 27/05/17 10:20, Ryan Joseph wrote:
On May 27, 2017, at 5:13 PM, Mark Morgan Lloyd
wrote:> > someFunction(TPoint(X:0.0; Y:0.0));> > Pascal purists would probably object
to that style, since what it's effectively doing is passing the parameters as an explicit list.
I mentioned this form of “
> On May 27, 2017, at 5:13 PM, Mark Morgan Lloyd
> wrote:
>
> someFunction(TPoint(X:0.0; Y:0.0));
>
> Pascal purists would probably object to that style, since what it's
> effectively doing is passing the parameters as an explicit list.
I mentioned this form of “default constructor" as a sor
On 27/05/17 09:40, Ryan Joseph wrote:
On May 27, 2017, at 4:27 PM, Graeme Geldenhuys
wrote:> > Yeah, that was going to be my suggestion too. I've done this many times
when many parameters are optional. Use a record as parameter type. The other benefit of
this is that it is future and backward
On Saturday 27 May 2017 11:30:38 Ryan Joseph wrote:
>
> can you show an example of this? Just curious.
>
In MSEgui most of the public widget methods an method properties use this
approach.
"
type
keyeventinfoty = record
eventkind: eventkindty;
key,keynomod: keyty;
chars: msestring;
shifts
IMO, it's not about named parameters;
furthermore, it is not about readability, but this IMO
is a maintenance issue.
Think about a procedure that has two parameters and a lot of callers
and you want to add a third one.
it would be nice if you could specify a default value for the new
third param
> On May 27, 2017, at 4:27 PM, Graeme Geldenhuys
> wrote:
>
> Yeah, that was going to be my suggestion too. I've done this many times when
> many parameters are optional. Use a record as parameter type. The other
> benefit of this is that it is future and backwards compatible. You can add or
On 2017-05-27 09:47, Mark Morgan Lloyd wrote:
It would probably be possible to do it by using a record with nullable
fields as the parameter.
Yeah, that was going to be my suggestion too. I've done this many times
when many parameters are optional. Use a record as parameter type. The
other be
On 27/05/17 08:00, Michael Van Canneyt wrote:
On Sat, 27 May 2017, Mr Bee via fpc-pascal wrote:
Hi,>> As Pascal mostly well known as a safe, easy to read, and elegant
language,> don't you think Pascal needs named parameter? I mean for
ALL kind of> parameters, not just for Variants. When you have
On Sat, 27 May 2017, Mr Bee via fpc-pascal wrote:
Hi,
As Pascal mostly well known as a safe, easy to read, and elegant language,
don't you think Pascal needs named parameter? I mean for ALL kind of
parameters, not just for Variants. When you have a function with many
parameters having default
Hi,
As Pascal mostly well known as a safe, easy to read, and elegant language,
don't you think Pascal needs named parameter? I mean for ALL kind of
parameters, not just for Variants. When you have a function with many
parameters having default values, you know that named parameter is
desirable. Fo
24 matches
Mail list logo