TheaterFire

Using AWT in C#, and other funny things

Posted by zdimension@reddit | programming | View on Reddit | 10 comments

Reply to Post

10 Comments

tomw255@reddit

I think the synchronized execution of methods is exposed MethodImplAttribute( MethodImplOptions.Synchroniized) I sometimes regret that c# does not allow anonymous types to implement interfaces.
View on Reddit #12793262

supermitsuba@reddit

How would you implement an interface with anonymous types? Only way I could see is like the dynamic keyword, similar to how Typescript may “implement” an interface.
View on Reddit #12797405

modernkennnern@reddit

There is a proposal for it on GitHub.com/dotnet/csharplang. Can't remember anything about it though 🫠
View on Reddit #12798865

modernkennnern@reddit

Found it https://github.com/dotnet/csharplang/issues/4301
View on Reddit #12799020

tomw255@reddit

This is similar to what I envisioned, but the multiple interfaces example is so ugly. I do not know how I feel about this feature right now. ``` var client = new { Name = "Khalid", .... } : IClient, ICustomer; ``` Seems more consistent imo.
View on Reddit #12817830

FullPoet@reddit

> is so ugly Exactly the issue with many of the "other ways" of doing 1 thing. If you need an interface on your anonymous type - do you really need it to be anonymous? Do we need 7 different ways of doing constructors? Look at C++. Its okay to say no.
View on Reddit #12825035

modernkennnern@reddit

You should state your opinion on that issue! :)
View on Reddit #12818230

GameFreak4321@reddit

The tidbit about mscorlib was interesting. I had been assuming it was short for "Microsoft Core Library" squished down so it could fit in an 8.3 filename.
View on Reddit #12792323

binarycreations@reddit

Cool read. What do you think of the languages these days?
View on Reddit #12783258

ASCS6@reddit

GitHub Gold Mines: Exploring the Finest Repositories for Developers 💻🚀👇 [Repo](https://twitter.com/AhmedS9190027/status/1716429076221600134)
View on Reddit #12778258