generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: C vs C# vs C++

Previous Thread :: Next Thread 
GeorgeLimp is not online. GeorgeLimp
Joined: 07 Jun 2012
Total Posts: 132
12 Jun 2012 04:39 PM
Which do you prefer and/or which can you program?

I'm pretty good at C++. I can code full applications and even 2D platforms/isometrics/and other types of 2D games from scratch.

I'm pretty good at C# as well, mostly because I know all the ins-and-outs of the .NET framework after taking a class on it. I can program completely from scratch (not using Visual C#).

I don't know crap about C though. I've never bothered with it. But I do know a bit of 32bit Assembly which actually holds similarities to C.


So, which is your favorite/preferred/best?
Report Abuse
LocalChum is not online. LocalChum
Joined: 04 Mar 2011
Total Posts: 6906
12 Jun 2012 04:45 PM
C# for quickly designing and building applications for a Windows platform, C++ for things where I need features that C# doesn't offer (cross-platform compatibility, full Windows API access (.NET can't wrap everything), etc.), and C for where it is required (for example, an OS kernel).
Report Abuse
geicogeko is not online. geicogeko
Joined: 27 Apr 2010
Total Posts: 2727
12 Jun 2012 04:47 PM
George Limp, John Frimp, what's next???
Report Abuse
GeorgeLimp is not online. GeorgeLimp
Joined: 07 Jun 2012
Total Posts: 132
12 Jun 2012 04:50 PM
@geicogeko

Albert Thimp.
Report Abuse
pokelover980 is not online. pokelover980
Joined: 12 Jun 2009
Total Posts: 4141
12 Jun 2012 04:54 PM
"full Windows API access (.NET can't wrap everything)"

No, but it wraps everything you should ever need out of the Windows API in some way or another, and if it doesn't, then there's always DllImport to help you with that. However, I've yet to encounter something in the Windows API that the .NET Framework doesn't provide some sort of interface to.
Report Abuse
stravant is not online. stravant
Forum Moderator
Joined: 22 Oct 2007
Total Posts: 2893
12 Jun 2012 04:55 PM
Your saying that you know C++ but not C is actually a testament to experience. Just because you know C++ does not mean that you actually know how to get anything done in the C ecosystem.

No one will ever take my C++ away from me, other than possibly Scala, which is basically the C++ of the JVM world.
Report Abuse
stravant is not online. stravant
Forum Moderator
Joined: 22 Oct 2007
Total Posts: 2893
12 Jun 2012 05:01 PM
"No, but it wraps everything you should ever need out of the Windows API in some way or another,"

That's not true if you're doing any sort of low level work for stuff that is not primarily a graphical application. There's a lot of windows APIs that have to do with low level memory and file-system management which aren't fully exposed to .NET.

There's even some of the more advanced window manager features for doing fancy stuff like extending aero glass into the client area and dealing with transparency that aren't really in the set of GUI features that .NET gives you.

"and if it doesn't, then there's always DllImport to help you with that. However, I've yet to encounter something in the Windows API that the .NET Framework doesn't provide some sort of interface to."

At that point though you're not really using .NET anymore, since the windows APIs work totally differently to typical .NET coding styles.
Report Abuse
GeorgeLimp is not online. GeorgeLimp
Joined: 07 Jun 2012
Total Posts: 132
12 Jun 2012 05:03 PM
@stravant

I'm confused. Are you saying I can't do anything in C language because I don't know C? How does that work? Someone can know Visual Basic and get a lot done without knowing VBScript (VBScript can be thought of as the core of VBScript, Visual Basic .NET can be thought of as the successor to VBScript).

@pokelover

Oh, so you're a C# person. Coo. I like C# a lot. I usually would rather use C++ over C#, or sometimes Visual C++ over Visual C#, but C# is still really awesome.

I like how C# feels really solid and simplistic but is still very powerful. I was considering starting a segment on my YerTerb channel about C# and coding from scratch.

I usually use the CSC.EXE compiler for C#. The one located at C:\Windows\Microsoft.NET\Framework\v#\CSC.EXE.

Report Abuse
myrkos is not online. myrkos
Joined: 06 Sep 2010
Total Posts: 8072
12 Jun 2012 05:08 PM
I like C++ a lot. I've done quite a few projects in it, and I've started using Objective-C++ recently because I was basically forced to, but now it's pretty interesting.
Report Abuse
geicogeko is not online. geicogeko
Joined: 27 Apr 2010
Total Posts: 2727
12 Jun 2012 05:10 PM
I have to learn objective-c, I need to make my new macbook pro worth it.
Report Abuse
Maradar is not online. Maradar
Joined: 06 Mar 2012
Total Posts: 4478
12 Jun 2012 05:20 PM
C# has many syntax errors.
Report Abuse
Guarranteed is not online. Guarranteed
Joined: 06 Dec 2010
Total Posts: 2799
12 Jun 2012 05:21 PM
Oh god Obj-C *Throws Up everywhere*, Apples version of a good programming language. Anyways, C# has very similar syntax to Java, that's why a lot prefer it.
Report Abuse
pokelover980 is not online. pokelover980
Joined: 12 Jun 2009
Total Posts: 4141
12 Jun 2012 05:21 PM
"That's not true if you're doing any sort of low level work for stuff that is not primarily a graphical application. There's a lot of windows APIs that have to do with low level memory and file-system management which aren't fully exposed to .NET."

However, are those parts of the APIs really needed in .NET development? I find that most of the parts of the Windows APIs that are left out that developers complain about don't serve a purpose in the .NET environment and people complain about them because they're used to their C++ ways of doing things. However, there is probably a nice .NET alternative to it in some way, or it's just overall unneeded in .NET.

"There's even some of the more advanced window manager features for doing fancy stuff like extending aero glass into the client area and dealing with transparency that aren't really in the set of GUI features that .NET gives you."

This is the only part of the Windows API that I can say that I wish was in the .NET framework, but I've used DllImport to get these features, and developed a class derived from the Control class so that it's easily accessible in a fashion similar to the way .NET does it.

"At that point though you're not really using .NET anymore, since the windows APIs work totally differently to typical .NET coding styles."

Meh, depends on how you use DllImport. Yes, you're not really using .NET because you're importing from outside the framework, but if you write a nice class structure around those imports you can certainly use them in a style very similar to .NET. Note the keyword here is use, though. Importing them certainly goes outside the norm of .NET and you have to do a bit of work to get it to play nicely with .NET coding styles, but you can make it play nice with that work.

"Oh, so you're a C# person. Coo. I like C# a lot. I usually would rather use C++ over C#, or sometimes Visual C++ over Visual C#, but C# is still really awesome. "

Indeed I am. At least, I am most of the time. I will admit that C++ does have some advantages over C#, but C# also has its advantages and the two even out in my opinion. If I need to write something to be cross-platform, I'll do it in C++. However, whenever I'm doing game development, I find that C# is much easier, as it is a managed language and does all the low-level memory work for me, and it provides the XNA Framework as a very powerful library. I couldn't care less that it limits my games to Windows, Xbox 360, and Windows Phone, because Windows to me is really the only market that would care for my games.

"C# has many syntax errors."

What? I don't even understand your logic here, mainly because you don't present any.
Report Abuse
GeorgeLimp is not online. GeorgeLimp
Joined: 07 Jun 2012
Total Posts: 132
12 Jun 2012 05:33 PM
Have any of you ever heard of JScript .NET? It's a successor to JScript and goes along with Visual Basic .NET, C#, and C++ .NET. The only difference is JScript .NET never got a "Visual" program made for it. But you can still use the compiler that comes with Window's computers and build JScript. JScript .NET is a little better than Visual Basic .NET, but is a little worse than C#. Since JScript was originally kind of like a spin-off to JavaScript, it shares a lot of similarities in its core syntax. Meaning it holds a lot of similarities to C languages. Plus, JScript .NET had a lot added to its syntax so it's even closer looking to C. But it's still pretty from C, just similar in ways. It's kind of like a breed of C# and JavaScript syntax.

Idk, I just thought JScript .NET was interesting. I'm not saying I prefer it or anything, just thought it was interesting.
Report Abuse
Maradar is not online. Maradar
Joined: 06 Mar 2012
Total Posts: 4478
12 Jun 2012 05:41 PM
@pokelover980

echo("a");

exec("./a.cs");

Will result in a syntax error.

function a()
{
echo("a");
else
echo("b");
};

Will also result in a syntax error.
Report Abuse
stravant is not online. stravant
Forum Moderator
Joined: 22 Oct 2007
Total Posts: 2893
12 Jun 2012 05:42 PM
"I'm confused. Are you saying I can't do anything in C language because I don't know C? How does that work? Someone can know Visual Basic and get a lot done without knowing VBScript (VBScript can be thought of as the core of VBScript, Visual Basic .NET can be thought of as the successor to VBScript)."

Although the syntax are similar writing a C++ application VS a C one are totally different experiences, and just because you can do one does not mean you can do the other.
Report Abuse
GeorgeLimp is not online. GeorgeLimp
Joined: 07 Jun 2012
Total Posts: 132
12 Jun 2012 05:44 PM
@stravant

... I never said I could... In fact, in my main post I specifically said I knew nothing about programming C. I said the exact opposite. >.>
Report Abuse
stravant is not online. stravant
Forum Moderator
Joined: 22 Oct 2007
Total Posts: 2893
12 Jun 2012 05:44 PM
"However, there is probably a nice .NET alternative to it in some way, or it's just overall unneeded in .NET."

That's not true. There's a _lot_ of stuff that is not covered in .NET. Yes, you can do just about anything to do with writing user interfaces and typical application tasks with it, but there's a lot more to the windows API than that.
Report Abuse
pfctink is not online. pfctink
Joined: 23 Feb 2008
Total Posts: 2516
12 Jun 2012 07:08 PM
I prefer C#, even though I don't use any of those languages, I've seen some people work on C++ though, too complicated.

I have never seen a program made with C. :/

~The one you can't see~
Report Abuse
pokelover980 is not online. pokelover980
Joined: 12 Jun 2009
Total Posts: 4141
12 Jun 2012 07:11 PM
"echo("a");

exec("./a.cs");

Will result in a syntax error.

function a()
{
echo("a");
else
echo("b");
};

Will also result in a syntax error."

...that's because that's not even valid C#. Your trolling skills are bad and you should feel bad.
Report Abuse
stravant is not online. stravant
Forum Moderator
Joined: 22 Oct 2007
Total Posts: 2893
12 Jun 2012 07:14 PM
"I have never seen a program made with C. :/"

These days it's usually libraries and low level OS stuff, not whole applications, but there are some big ones, for instance GIMP and most of Blender are C code.
Report Abuse
pfctink is not online. pfctink
Joined: 23 Feb 2008
Total Posts: 2516
12 Jun 2012 07:15 PM
Thanks stravant. Now I'm learning. xD I feel like I'm in the 1st grade again.

By the way, since you had your name changed, why didn't you have the "s" capitalized?

~The one you can't see~
Report Abuse
stravant is not online. stravant
Forum Moderator
Joined: 22 Oct 2007
Total Posts: 2893
12 Jun 2012 07:20 PM
Because I think that the name looks worse that way. I like it all lowercase. I think of online usernames as more of an identifier as opposed to a name, so it feels more natural for them to be in all lowercase.
Report Abuse
pfctink is not online. pfctink
Joined: 23 Feb 2008
Total Posts: 2516
12 Jun 2012 07:22 PM
Well, as long as you're happy with that, I on the other hand would like my name capitalized, it is a name that I'm using for this site now and forever... but I was 12 at the time and never cared for grammar. Now I think differently and want to get it changed to "Pfctink" but sadly, I cannot.

~The one you can't see~
Report Abuse
GeorgeLimp is not online. GeorgeLimp
Joined: 07 Jun 2012
Total Posts: 132
12 Jun 2012 07:24 PM
@Pfctink

Actually, C++ isn't that complicated, really. It holds a lot of the same concepts you use in C#, but just has a longer way of going about it. I really don't find Visual C++ work that much more complicated than Visual C# work.


Agreed with the C part, though. I've never seen a C application. People just don't seem to make them.

I can make a guess, though. I'm sure this would work:

void main() {
int name;
printf("What is your name? ");
scanf("%s", name);
printf("Hello, ");
printf(name);
printf("!");
}


Because like I've said, I've used 32bit Assembly before. And to do this in 32bit Assembly I'd write:

global _main
extern _printf
extern _scanf

section .data
prompt db "What is your name? ", 0
greeting db "Hello, ", 0
exclaim db "!", 0
format db "%s", 0

section .bss
xname resb 100

section .text

_main:
push ebp
mov ebp, esp

push prompt
call _printf
add esp, 4

push xname
push format
call _scanf
add esp, 8

push greeting
call _printf
add esp, 4

push xname
call _printf
add esp, 4

push exclaim
call _printf
add esp, 4

mov esp, ebp
pop ebp
ret
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image