Re:The search for easier safe systems programming
by neonsunset on Thursday May 09, 2024 @01:44AM
(#40305607)
You didn’t. The example does not exist and the terms you used don’t apply to C#.
Post an actual example (code).
Re:The search for easier safe systems programming
by dartos on Friday May 10, 2024 @08:27AM
(#40318158)
Delegate is a C# term and was what I was talking about
https://learn.microsoft.com/en-us/dotnet/csharp/programming-...
I need to create a delegate for any function I want to pass around.
Re:The search for easier safe systems programming
by neonsunset on Friday May 10, 2024 @09:04AM
(#40318505)
Trolling is bad, consider asking ChatGPT or reading documentation first, thanks.
var func1 = (int i) => i + i;
var func2 = () => func1(1) * 2;
Console.WriteLine(func1(4) + func2());
Regardless of the actual word, there is an extra thing I need to do to pass a function to a higher order function as an argument.
I was using this as an example to demonstrate how C#’s support for the language features I like require some ceremony which reduce expressiveness and require me to think about the language more.