Friendica
Khalid K-1000 🤖
Khalid K-1000 🤖

Khalid K-1000 🤖

khalidabuhakmeh@mastodon.social

Khalid K-1000 🤖

khalidabuhakmeh@mastodon.social

Loves @NicoleAbuhakmeh. #OSS supporter. #software developer. He/Him. Living the simulation lifestyle. #dotnet #java #javascript #html

searchable

ActivityPub
2022-12-15 13:40:06 2022-12-15 13:40:06 2022-12-15 13:38:11 2059729

Khalid K-1000 🤖
Khalid K-1000 🤖
mastodon - Link to source

Khalid K-1000 🤖

2 years ago • •

Khalid K-1000 🤖

2 years ago • •


The trend in #csharp seems to isolate as much inside a function (thanks #fsharp).

I think it would make sense for #csharp to adopt global functions as a first-class citizen.

It definitely would reduce ceremony for folks using something like the Mediator pattern.

#dotnet

namespace MyNamespace;

public function CreatedItem Handle(CreateItemCommand command, IMessageBus bus) 
{
    // do stuff
}
#fsharp #dotnet #csharp
  •  Languages
  •  Search Text
  •  Share via ...
in reply to Khalid K-1000 🤖

Arkadiusz Świętnicki 🇨🇳 I HAVE MOVED
mastodon - Link to source

Arkadiusz Świętnicki 🇨🇳 I HAVE MOVED

in reply to Khalid K-1000 🤖 • 2 years ago • •
My opinion is that we might get first-class support for global functions as C# is heading in that direction with top-level code, for example.
  •  Languages
  •  Search Text
  •  Share via ...
⇧