|
Comments and Discussions
|
 |
 |
I am interested in knowing what primitive types C# has that Java does not.
Note that stacks are machine-dependent; not all processes have stacks. That might be why stacks are excluded from the Java Virtual Machine that is designed to be portable.
What is the "C# API"? I think it would help to specify it in the terminology that defines it.
The article says: "C# has support for output parameters" ... "featured shared by C++". I am familiar with C++ but I do not understand what is meant by "output parameters" for C++. I think it would help to clarify what is meant by "output parameters" for C++.
Also the article says: "Following the example of C and C++, C# allows call by reference for primitive and reference types.". Note that C does not have reference types as does C++. Also, the term "call by reference" is confusing for the C and C++ languages. I think that instead of saying "call by reference" in the context of C and C++, it is better to use the terminology that the C and C++ langauges use to describe what you are trying to describe.
|
|
|
|
 |
"I am interested in knowing what primitive types C# has that Java does not."
As notes in the post, C# has unsigned integers, which java lacks. Moreover, C# has the "decimal" type as built-in type.
"Note that stacks are machine-dependent; not all processes have stacks. That might be why stacks are excluded from the Java Virtual Machine that is designed to be portable."
The post is about the languages (C# and Java), and not the runtime (CLR and JVM)... Moreover, Mono proves to be portable to.
"What is the "C# API"? I think it would help to specify it in the terminology that defines it."
I believe he intended "class library"...
"The article says: "C# has support for output parameters" ... "featured shared by C++". I am familiar with C++ but I do not understand what is meant by "output parameters" for C++. I think it would help to clarify what is meant by "output parameters" for C++."
In C++ these are reference parameter:
void Foo(int& i) { ... }
In C# you actually have two types of "output parameters":
void Foo(ref int i) { ... }
Which would be in-out parameter (and must be initialize before calling Foo), and
void Foo(out int i) { ... }
Which would only used as an out parameter (and must be initialized inside Foo).
|
|
|
|
 |
C# has dynamic types
if(me){
throw new Exception("hello there");
}
|
|
|
|
|
 |
|
General News Suggestion Question Bug Answer Joke Rant Admin
Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.
|
First Posted | 11 Jan 2008 |
Views | 103,244 |
Bookmarked | 33 times |
|
|