Bitcoin Forum

Alternate cryptocurrencies => Altcoin Discussion => Topic started by: neuromancer56 on July 28, 2013, 12:18:25 PM



Title: What are the pros and cons of coding an alt-coin in C#?
Post by: neuromancer56 on July 28, 2013, 12:18:25 PM
I'm working on a new alt-coin called Flexcoin.   My work has been in C# since it was first introduced way back around 2001.    So this is my area of strength.  I putzed around in C++ back when it first came out in 1985.   I know things have changed with C++ over the years, namely things like smart pointers and the like.   But I still see C# as having a huge advantage in programmer productivity.   So for me, I'm strongly considering branching Novacoin to create a starting point for Flexcoin but then using C# as much as possible for new development.   

I see one big con of this being that users installs would be larger (requiring Mono if they are not on Windows).  Requiring Xamarin if they are on android or iOS.    But is this really so terrible?   Am I completely barking up the wrong tree and should I learn C++, Java, and objective C?   


Title: Re: What are the pros and cons of coding an alt-coin in C#?
Post by: CIYAM on July 28, 2013, 12:27:00 PM
You should consider whether a C# solution is going to go down well with Linux users (of which there are many on this forum).

Basically Mono is the only C# IDE for Linux and I don't think it is installed by standard in most distros (although for that matter neither is boost so maybe that isn't a big deal in itself).


Title: Re: What are the pros and cons of coding an alt-coin in C#?
Post by: transcoder on July 28, 2013, 12:58:12 PM
It boils down to cross-platform compatibility. Bitcoin / Litecoin and this current generation of alt-coins is based off of C++ and uses the QT framework for GUI elements. That makes it a lot easier to compile on various platforms. I haven't dabbled in C# in ages, but if you're able to build the daemon and GUI with C# on Windows, Linux and Mac OS X, I don't see why not if that's your area of expertise.


Title: Re: What are the pros and cons of coding an alt-coin in C#?
Post by: fishy on July 28, 2013, 01:11:42 PM
This is a bit off topic, but I'm not a programmer.  What differs between C++ and C#?


Title: Re: What are the pros and cons of coding an alt-coin in C#?
Post by: CIYAM on July 28, 2013, 01:13:29 PM
This is a bit off topic, but I'm not a programmer.  What differs between C++ and C#?

They are completely different languages (try some internet searching if you are actually interested).


Title: Re: What are the pros and cons of coding an alt-coin in C#?
Post by: eduffield on July 28, 2013, 01:55:40 PM
I was just thinking about this for a coin I am considering making... I think it's a good idea for the following reasons.

* Primecoin started out very low performance and the community took it upon themselves to improve it.
* If the coin is a really good idea, people will adapt your c# to cython/c/c++ to gain an advantage and after the advantage is leaving they would open source it

I think this would basically add 1 extra step to the arms race that happens with new coins. I.e, Bytecode, machine code, GPU, ASICs, etc.


Title: Re: What are the pros and cons of coding an alt-coin in C#?
Post by: BazkieBumpercar on July 28, 2013, 02:47:24 PM
I don't really see the use - C++ can do the same as C#, but on more platforms.


Title: Re: What are the pros and cons of coding an alt-coin in C#?
Post by: BrightAnarchist on July 28, 2013, 03:03:17 PM
I don't really see the use - C++ can do the same as C#, but on more platforms.

That's like saying assembly can do what C does, so why use C?

C# is a higher level language than C++, which means more programmer productivity - at the cost of some performance, of course.

Personally, I go as high level as possible (python,awk,lisp,etc) until I need more non-I/O performance. Then you look down the list toward java/C# and finally C/C++ if you really need it for time critical pieces of code. If you lean towards high level languages, you'll get stuff done waaay faster and with fewer bugs

- a former/reformed C++ fanatic


Title: Re: What are the pros and cons of coding an alt-coin in C#?
Post by: fluffypony on July 28, 2013, 03:05:21 PM
That's like saying assembly can do what C does, so why use C?

C# is a higher level language than C++, which means more programmer productivity - at the cost of some performance, of course.

Personally, I go as high level as possible (python,awk,lisp,etc) until I need more non-I/O performance. Then you look down the list toward java/C# and finally C/C++ if you really need it for time critical pieces of code. If you lean towards high level languages, you'll get stuff done waaay faster and with fewer bugs

- a former/reformed C++ fanatic

True, but since we're talking about an alt-coin, why bother? Why reinvent the wheel, when there is an existing codebase you can work off of and improve?


Title: Re: What are the pros and cons of coding an alt-coin in C#?
Post by: bitpar on July 28, 2013, 03:24:47 PM
You wouldn't be able to use Bitcoin's source code as a starting point without major work and you won't be able to easily implement improvements made to Bitcoin. Performance may be an issue, C# uses garbage collection, which introduces unnecessary overhead. There are ways to use C++ classes in a C# program, this might be an option but I don't have experience mixing C# and C++ to know if it's a good idea.


Title: Re: What are the pros and cons of coding an alt-coin in C#?
Post by: Balthazar on August 31, 2015, 10:29:43 AM
In the progress :D

https://github.com/CryptoManiac/NovacoinLibrary


Title: Re: What are the pros and cons of coding an alt-coin in C#?
Post by: lordoliver on August 31, 2015, 01:25:35 PM
Why do people not understand, that a coin is not the program but the protocol. It doesn't matter, which language you use.
Anyone can rewrite the code in another language and use it in the same chain (see XT, its the same language, but wouldn't need to). The only problem is, if you change the protocol...


Title: Re: What are the pros and cons of coding an alt-coin in C#?
Post by: Come-from-Beyond on August 31, 2015, 07:54:52 PM
C# is a higher level language than C++, which means more programmer productivity - at the cost of some performance, of course.

Lose some performance (assuming JIT compilation doesn't work) but gain security. This is a no-brainer.


Title: Re: What are the pros and cons of coding an alt-coin in C#?
Post by: Este Nuno on September 01, 2015, 12:12:52 PM
C# is much better these days about cross platform compatibility and open source. It's only going to get better too from what I can tell from observing Microsoft's path thus far. They've changed their strategy a lot.

Check this out: http://techcrunch.com/2015/04/29/microsoft-shocks-the-world-with-visual-studio-code-a-free-code-editor-for-os-x-linux-and-windows/


Title: Re: What are the pros and cons of coding an alt-coin in C#?
Post by: Balthazar on September 05, 2015, 03:16:26 PM
C# is much better these days about cross platform compatibility and open source. It's only going to get better too from what I can tell from observing Microsoft's path thus far. They've changed their strategy a lot.

Check this out: http://techcrunch.com/2015/04/29/microsoft-shocks-the-world-with-visual-studio-code-a-free-code-editor-for-os-x-linux-and-windows/
It's linked with glibc 2.14. My system has only 2.13, so their blob doesn't work for me ::)