4 ms·
Callable may have been the wrong word. I think I meant delegate. (I do work with Godot, but not in C#. Some wires must’ve gotten crossed) Regardless of the ac
by dartos 2y ago
Callable may have been the wrong word. I think I meant delegate.
(I do work with Godot, but not in C#. Some wires must’ve gotten crossed)
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.
- neonsunset 2y agoYou didn’t. The example does not exist and the terms you used don’t apply to C#. Post an actual example (code).
- dartos 2y agoDelegate is a C# term and was what I was talking about https://learn.microsoft.com/en-us/dotnet/csharp/programming-guide/delegates/ https://learn.microsoft.com/en-us/dotnet/csharp/programming-... I need to create a delegate for any function I want to pass around.
- neonsunset 2y agoTrolling 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());