LWN.net Logo

And Mono on Linux?

And Mono on Linux?

Posted May 31, 2012 6:08 UTC (Thu) by hfg22 (guest, #84898)
In reply to: And Mono on Linux? by elanthis
Parent article: Moonlight sent into twilight (The H)

You're confusing C# and Mono's implementation of C#.

Perhaps if the C# language was separated from Mono (ie. without all the .Net cruft) there might be something worthwhile. For example, adding C# support to GCC or Clang.

Also, what does C# bring to the table that is not present in C++11 ?


(Log in to post comments)

And Mono on Linux?

Posted May 31, 2012 16:53 UTC (Thu) by rriggs (subscriber, #11598) [Link]

What does C# bring to the table that is not present in C++11?

Ever try to develop a context-free AST for C++? It's impossible as long as the C preprocessor exists. This makes full-featured, error-free refactoring tools impossible.

Don't get me wrong, simple refactoring tools are possible. It's the "full-featured" and "error free" part that's not. Change or add one #define and the whole program changes meaning. I've refactored code that could be compiled on both Unix and Windows. After a fairly simple automated refactoring on a Linux system, the Windows build no longer worked. That's because the Windows-specific code was invisible to the refactoring tool.

With that said, it's all a trade off. I can do things with the C++ pre-processor in terms of code generation that's impossible to do in C#. But for most general programming needs refactoring tools, runtime introspection, and the ability to freely mix static and dynamic languages are far more valuable.

And Mono on Linux?

Posted May 31, 2012 21:48 UTC (Thu) by Cyberax (✭ supporter ✭, #52523) [Link]

How about LINQ? Including PLINQ and other nice xLINQs. Or dynamic typing?

>With that said, it's all a trade off. I can do things with the C++ pre-processor in terms of code generation that's impossible to do in C#. But for most general programming needs refactoring tools, runtime introspection, and the ability to freely mix static and dynamic languages are far more valuable.

If you want to do complex metaprogramming (and I think one shouldn't do it easily) then you should use a good language. For example, Nemerle ( http://nemerle.org/About/ ) can do things C++ preprocessor can only dream of while staying refactorable and autocomplete-friendly.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds