Order of evaluation for named arguments
matheus
matheus at gmail.com
Wed Apr 2 11:11:24 UTC 2025
On Tuesday, 1 April 2025 at 18:58:08 UTC, Walter Bright wrote:
> ...
> Breaking existing code has repeatedly driven people away from D.
> ...
I'm not saying you're wrong but is there any data about this? - I
mean after "n" breakages we had a decrease in numbers of users?
I pretty sure complains about breakages exists, as some
developers leaved D community because restraint or DIP
bureaucracy, but I think in the end most people would prefer a
coherent language than another C++ one.
Will users leave because this broke up software or fell safe that
it follows a pattern?
The problem I see with situation like this, is that we can't
complain later when some streamer decide to use a language and
show its problems for a large audience, and just after that
people start to realize that we should have fixed this earlier.
Finally just tried C# and the same example given by Steve:
using System;
public class Program{
public static int x;
public static void foo(int a, int b){
Console.WriteLine("a: " + a + " b: " + b);
}
public static void Main(){
foo(b:++x,a:++x);
}
}
Prints:
a: 2 b: 1
So, arguments are evaluated left to right.
Matheus.
More information about the Digitalmars-d
mailing list