Those that argue that the "Function" is a first class citizen in C# or Java are simply wrong, this includes Microsoft and possibly Oracle.
Can you explain this? First class citizens in programming languages are entities which support operations generally available to other entities. In this case it would be;
returning from method
being passed as a parameter
being assigned to a variable
modified
And all four things are supported by functions in both, Java and C#.
Sure in C# functions only live within a class. In Javascript both a class or function are top level.
Sure there are tricks to make the C# function appear to be first class with the "using" statement but they are still required to be defined inside of a class. Why MSFT doesn't fix this is dumb.
Java is the same thing.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Can you explain this? First class citizens in programming languages are entities which support operations generally available to other entities. In this case it would be;
And all four things are supported by functions in both, Java and C#.
Sure in C# functions only live within a class. In Javascript both a class or function are top level.
Sure there are tricks to make the C# function appear to be first class with the "using" statement but they are still required to be defined inside of a class. Why MSFT doesn't fix this is dumb.
Java is the same thing.