Liste des Groupes | Revenir à l c |
Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:Does it have optional arguments with default values? IMO keyword arguments are much less useful without that feature/On 01.03.2025 23:20, Lawrence D'Oliveiro wrote:For example, it exists in Ada since 1983. The following are allOn Sat, 1 Mar 2025 21:32:59 +0100, Janis Papanagnou wrote:>My guess is that this form is just an informal syntax mimicking Perl's>
function parameter passing ...
The idea of passing arguments by keyword predates Perl.
That wouldn't surprise me. - I know it from Perl. - Which other
(earlier) languages do you have in mind? - What's its origin?
equivalent, given that Foo takes integer arguments Arg1 and Arg2:
Foo(Arg1 => 10, Arg2 => 20);
Foo(Arg2 => 20, Arg1 => 10);
Foo(10, Arg2 => 20);
Foo(10, 20);
The syntax is IMHO much nicer than using /*...*/ comments in C.
Les messages affichés proviennent d'usenet.