PHO - Pokémon Hackers Online
Go Back   PHO - Pokémon Hackers Online > Homebrew & Coding > Coding Discussion

Coding Discussion Discuss programming and coding and get help here.

Reply
 
Thread Tools Display Modes
Old 25th January 2014, 09:19 PM   #1
Alex
srs fkn bsns btch
 
Alex's Avatar
 
Join Date: Jan 2014
Location: Makin' bacon
Age: 19
Posts: 14
Alex
Question C/C++ or C#?

This has been a long standing question among countless developers and programmers the world over. So, which do you prefer? Explain why.
__________________
Co-Administrator for the RHM IRC and System Affairs
Administrator at the Cave of Origin
The Cave of Origin just reached 100,000,000,000 hits!
Alex is offline   Reply With Quote
Sponsored Links
Old 25th January 2014, 09:36 PM   #2
Team Fail
Balance and Ruin
Ex-StaffStyle AdminstratorPHO VIP
 
Team Fail's Avatar
 
Join Date: Jul 2010
Posts: 585
Team Fail Team Fail Team Fail Team Fail Team Fail
Default

C# because it's the one I actually know.
__________________
twitter | dropbox | youtube | bro

Thank you for your time, PHO. I won't soon forget it.
Team Fail is offline   Reply With Quote
Likes Elsa liked this post
Old 25th January 2014, 10:21 PM   #3
Alex
srs fkn bsns btch
 
Alex's Avatar
 
Join Date: Jan 2014
Location: Makin' bacon
Age: 19
Posts: 14
Alex
Default

I personally prefer the former (particularly C) because of its simplicity and platform-independent nature. And I get to use Notepad++ to write all of my code, which is highly customizable, to say the least. :P
__________________
Co-Administrator for the RHM IRC and System Affairs
Administrator at the Cave of Origin
The Cave of Origin just reached 100,000,000,000 hits!
Alex is offline   Reply With Quote
Old 26th January 2014, 01:13 AM   #4
Full Metal ★
Unstable?
Ex-StaffPHO VIP
 
Full Metal ★'s Avatar
 
Join Date: Oct 2012
Posts: 326
Full Metal ★ Full Metal ★
Default

I personally love all three, and each has their own place and advantage. I've noticed three mindsets for them.

C - I know exactly what I want to happen. If I were to write a GBA game, I would use this. ie: Assign a pointer to REG_DISP_CNT as (unsigned short*)DISPLAY_CONTROL = 0x[whatever]. It removes a lot of abstraction presented by the alternative C languages, so if you have a more precise knowledge of what is going on in your program, C can be much easier to debug / manage. ( Of course, memory leaks are much more challenging to track down in-code, but that just comes with writing better code ).

C++ - I have a love / hate relationship with C++. I love that it's very straight-forward, extensible and powerful ( like C ) and that it allows for more sophisticated things which is nice. But at the same time, if you ever use templating may the code be ever in your favor.

C# - Java done right, IMO. It handles GC for you which is good. Not a lot to say about it beyond the philosophy is agreeable and has a great amount of support for it. It's straight-forward and the syntax isn't unbearably complex ( compared to C++ ), and it does things that C++ can't do ( Delegates / Events, I'm looking at you ). Plus, it has LINQ and who doesn't like a LINQ?! not to mention how much simpler using external libraries is than in C++ or C
__________________

★ full metal.

#busy
Full Metal ★ is offline   Reply With Quote
Likes Team Fail liked this post
Old 26th January 2014, 05:38 AM   #5
Elsa
Let it go!
PHO VIP
 
Elsa's Avatar
 
Join Date: Apr 2010
Location: United States
Age: 20
Posts: 384
Elsa
Default

C# all the way!
__________________

- - - - - - - Elsa - - - - - - -
Twitter | YouTube | Steam | Twitch
- - - - - - - - - - - - - - - - -
Elsa is offline   Reply With Quote
Old 26th January 2014, 05:56 AM   #6
Team Fail
Balance and Ruin
Ex-StaffStyle AdminstratorPHO VIP
 
Team Fail's Avatar
 
Join Date: Jul 2010
Posts: 585
Team Fail Team Fail Team Fail Team Fail Team Fail
Default

Speaking of C#, here's a program I've been working on. If you're all the rage about HomePass on the 3DS, you may already know about it. I call it MACycle: http://gbatemp.net/threads/macycle-t...mepass.353328/

I'm working on the next version of it right as of now. It's been too long without an update, so I think I should get some bugfixes and whatnot into the program, no?

I hope to post a thread here about it soon as well, but I'm not sure if anyone here knows of HomePass or not.
__________________
twitter | dropbox | youtube | bro

Thank you for your time, PHO. I won't soon forget it.
Team Fail is offline   Reply With Quote
Old 26th January 2014, 10:03 AM   #7
Jambo51
Glory To Arstotzka
Ex-Staff
 
Jambo51's Avatar
 
Join Date: May 2012
Location: Scotland
Posts: 92
Jambo51
Default

Like Full Metal, I think of C# as Java done right. It has useful features simply not available in any of the other C-like languages I've used personally. However, it carries that nasty dependency on the Windows-specific .NET framework ( unless you use WINE, but even then it only works with applications developed to work in the .NET framework 2, and we're now on v4.5.). This also comes with a phenomenal GUI editor, which takes care of the code implementation of the GUI, which simplifies the process of building a GUI significantly.

C++ has a really odd setup and syntax. It wasn't meant to have OO functionality and it shows, and feels like it was tacked on as an after thought. While the whole <</>> system sorta makes sense, when you come to it from a language where you pass such things in as parameters to methods, it's just odd. Other oddities (some inherited from C) which bug me include the :: instead of . for referring to classes within namespaces and the use of -> instead of . (Inherited from C I believe). Powerful language, but due to the somewhat odd syntax, one I generally avoid.

C is immensely powerful, but the lack of OO functionality and the lack of ability to override operators is a nuisance that can't be ignored. Like C++, there is very little abstraction (less really) so what you write is very close to ASM. That said, the ability to define structures lessens the impact of the lack of OO functions somewhat since they behave like class definitions in many ways.

Overall, I prefer C# from the list of given languages, but really, what you choose depends 100% on the application you need to implement.
__________________
I have nothing interesting to add

Last edited by Jambo51; 26th January 2014 at 10:06 AM. Reason: Fixing typo
Jambo51 is offline   Reply With Quote
Likes Team Fail, Miksy91 liked this post
Old 26th January 2014, 06:58 PM   #8
Pia Carrot
Orange Developer
Administrator
 
Pia Carrot's Avatar
 
Join Date: Aug 2010
Location: Valencia Island
Age: 21
Posts: 848
Pia Carrot Pia Carrot Pia Carrot Pia Carrot
Default

I guess it depends on when and where. I wouldn't use C for something like homebrew development but anywhere else I'd probably use C# and C++ when working with Software and Game Development, respectively. C is good but it's pretty old afaik.
__________________

I'm a boob
Pia Carrot is offline   Reply With Quote
Old 26th January 2014, 07:17 PM   #9
Toni88
Neophyte
 
Toni88's Avatar
 
Join Date: Sep 2013
Posts: 9
Toni88
Default

I think that C++ is the best: an OOP programming language with also the standard C commands, that's all what you need. C# isn't bad, I don't know it well so I can't say nothing; maybe C++ and C are more difficult than C# but the results are better (in my opinion).
Toni88 is offline   Reply With Quote
Reply

Tags
c or c

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:23 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc. User Alert System provided by Advanced User Tagging (Lite) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Lite) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Pokémon characters and images belong to Pokémon USA, Inc. and Nintendo.
Pokémon Hackers Online (PHO) is in no way affiliated with or endorsed by Nintendo LLC, Creatures, GAMEFREAK inc,
The Pokémon Company, Pokémon USA, Inc., The Pokémon Company International, or Wizards of the Coast.
All forum/site content (unless noted otherwise) and site designs are © 2006-2013 Pokémon Hackers Online (PHO).
Green Charizard Christos TreeckoLv100

"Black 2" by ARTPOP. Kyurem artwork by XOUS.

no new posts