Hacker News new | ask | show | jobs
by caseymarquis 2212 days ago
C# is my goto language for productivity. If you want to lure us in, show a stereotypical example of go routines with channels solving a problem that would take significantly more effort with .net threads or .net tasks. We'll be intrigued enough to look further, and most won't stop to ask if channels seem like a recipe for deadlock/panic that's usually not the right abstraction. Don't mention the lack of generics; you'll scare us away before we get addicted to go routines.

Personally, I prefer actors over CSP. Async concurrency is less predictable, but race conditions don't generally happen when threads aren't synchronizing, so it doesn't matter if you're not making satellite firmware.

C# allows dynamic code compilation at runtime based on reflection. The cool part of LINQ is the 'Expressions', which allow you to analyze/rebuild the AST of code and take actions based on code structure. It's kind of like having runtime macros, except you can only make your own if you're willing to spend an hour doing something that would take 2 minutes in lisp. Keeps the DSLs to a minimum. I would miss this if I switched to go. Rust on the other hand...