3 ms·
The C# version would actually be: new Thread(() => Console.WriteLine("I'm in a Thread")).Start();
by prospero 18y ago
The C# version would actually be:
new Thread(() => Console.WriteLine("I'm in a Thread")).Start();
- axod 18y agoSilly example though, as threads are silly.
- prospero 18y agoIs it really silly? Almost all the code I write day to day is either multi-threaded or event-driven, so the above difference means a very real improvement in my quality of life. The code is simpler, more compact, and easier to understand at a glance months later. This isn't the only difference, either. C# is never going to be as terse as a scripting language, but with each release they are examining common workflows and streamlining them. Java may be adding in a lot of new features, but the syntactic integration seems awkward at best. The little things count for a lot.