Sorry C#

A place for Ogre users to discuss non-Ogre subjects with friends from the community.
TG_Jones
Halfling
Posts: 53
Joined: Thu May 29, 2008 4:05 pm

Sorry C#

Post by TG_Jones »

What MS created is a monster version of Java, I would not call it C#, because it's not even close to C or C++. They just complicated Java and made it single-platform instead. Added redundant features, and screwed up the hell out of the object oriented paradigm. Sorry C#, but it's true. The best name to call it is: Visual BASICA SCRIPT Platform Specific Mandarin :lol:
User avatar
xavier
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 9481
Joined: Fri Feb 18, 2005 2:03 am
Location: Dublin, CA, US
x 22

Post by xavier »

Actually, I consider it a much-cleaned-up version of Java -- and I also wouldn't say it's platform-specific (unless you call the CLR a platform), as the CLR has versions that run just fine on Linux and Mac. That would also be like saying Java is platform-specific since it only runs on the Java VM...

So yeah, if you went into C# expecting it to be like C or C++ then I see your frustration...because it's not. It's what MS created when they lost the Java suit with Sun...

On the other hand, dealing with the .NET Framework is about 3 orders of magnitude simpler than fiddling with arcane build settings and juggling clumsy classpaths to try to get libraries to work with your app (and don't even get me started on the ease of web app development with ASP.NET vs. that hideous monstrosity called "J2EE")....
Do you need help? What have you tried?

Image

Angels can fly because they take themselves lightly.
TG_Jones
Halfling
Posts: 53
Joined: Thu May 29, 2008 4:05 pm

Post by TG_Jones »

I'm not fan of Java either, but for example, I wanted to be able to declare some methods as friends in C# and keep them internal to the class by declaring them protected or private. However that was not possible. Yet they added other features which I consider anything but a way to distinguish C# from Java, or an attempt to make it look better than C++.

I mean by platform is OS, confusing term. Besides the way WinForms work is really retarded. Cannot figure out behind the scenes and the control/behavior customization is very framing and limited.
warmi
Gnoll
Posts: 674
Joined: Sun May 27, 2007 3:56 am
Location: USA

Post by warmi »

I wanted to be able to declare some methods as friends in C# and keep them internal to the class by declaring them protected or private
Then mark them as internal and use InternalsVisibleToAttribute.
TG_Jones
Halfling
Posts: 53
Joined: Thu May 29, 2008 4:05 pm

Post by TG_Jones »

well and this is simpler than declaring them as friend???!!! Intent of Java was to eliminate the headache of pointers, so that business-oriented programmers are relived from this burden. Now C# is actually replaces headache by another worse headache. Sorry C#, sorry MS!
User avatar
madmarx
OGRE Expert User
OGRE Expert User
Posts: 1671
Joined: Mon Jan 21, 2008 10:26 pm
x 51

Post by madmarx »

you know what ? :D

don't worry... be happy !
8)
User avatar
xavier
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 9481
Joined: Fri Feb 18, 2005 2:03 am
Location: Dublin, CA, US
x 22

Post by xavier »

TG_Jones wrote:I'm not fan of Java either, but for example, I wanted to be able to declare some methods as friends in C# and keep them internal to the class by declaring them protected or private. However that was not possible. Yet they added other features which I consider anything but a way to distinguish C# from Java, or an attempt to make it look better than C++.

I mean by platform is OS, confusing term. Besides the way WinForms work is really retarded. Cannot figure out behind the scenes and the control/behavior customization is very framing and limited.
What's to figure out? It works the same way any Java IDE does -- it generates code that calls methods/properties on the UI objects to set them up. This code in Windows.Forms apps is in the *.Designer.cs files.
Do you need help? What have you tried?

Image

Angels can fly because they take themselves lightly.
TG_Jones
Halfling
Posts: 53
Joined: Thu May 29, 2008 4:05 pm

Post by TG_Jones »

Yeah but the internals of wrapping the Win32 API is not deterministic and clear. We cannot rely on the assumptions that events are synchronized in a certain way or even being threaded behind the scenes.
User avatar
synaptic
Goblin
Posts: 270
Joined: Wed Jun 15, 2005 11:25 pm
Location: UK, Liverpool

Post by synaptic »

Well if you dont like it dont use it.....

I really like c# beats the hell out of errm *cough J# :roll:
With time and patience, the mulberry leaf becomes satin. With time and patience the mulberry leaf becomes a silk gown.
User avatar
synaptic
Goblin
Posts: 270
Joined: Wed Jun 15, 2005 11:25 pm
Location: UK, Liverpool

Post by synaptic »

*doh double post :D
Last edited by synaptic on Mon Jun 09, 2008 8:05 pm, edited 1 time in total.
With time and patience, the mulberry leaf becomes satin. With time and patience the mulberry leaf becomes a silk gown.
User avatar
xavier
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 9481
Joined: Fri Feb 18, 2005 2:03 am
Location: Dublin, CA, US
x 22

Post by xavier »

TG_Jones wrote:Yeah but the internals of wrapping the Win32 API is not deterministic and clear. We cannot rely on the assumptions that events are synchronized in a certain way or even being threaded behind the scenes.
The whole point of the .NET Framework is to remove from your concern those details. You deal with the framework and the classes it provides. You don't need to know those internals, in other words. If you want to have to know about them, the Win32 API is still perfectly usable from C++...
Do you need help? What have you tried?

Image

Angels can fly because they take themselves lightly.
TG_Jones
Halfling
Posts: 53
Joined: Thu May 29, 2008 4:05 pm

Post by TG_Jones »

Then .NET does not fit into the 3D computer graphics world. As I posted in the Ogre3D threads I have a big problem with WinForms and Ogre3D. I certainly blame .NET.
jjp
Silver Sponsor
Silver Sponsor
Posts: 597
Joined: Sun Jan 07, 2007 11:55 pm
Location: Cologne, Germany
Contact:

Post by jjp »

TG_Jones wrote:Then .NET does not fit into the 3D computer graphics world.
That is certainly false. See XNA for an example of .NET plus 3d computer graphics.. or Mogre :)
Enough is never enough.
User avatar
syd
Gnome
Posts: 362
Joined: Thu May 01, 2008 1:55 am
Location: Paris, France

Post by syd »

I've been using C# at work for 3 years now.
I can't compare it to Java, as I've never tried it.

What I can say is that it's a very convenient language, very productive, with a really well designed framework.
I wish C++ had an IDE and a framework as complete, designed with the same quality.
Actually I wished that a low level/platform independant/static language like C# existed, that could reach the performance of c++.

I keep an eye on D, with hope =)
jjp wrote:
TG_Jones wrote:Then .NET does not fit into the 3D computer graphics world.
That is certainly false. See XNA for an example of .NET plus 3d computer graphics.. or Mogre :)
I agree that C# does not fit into the 3D real time world. I mean not as the core of the graphic engine.
Since it's a dynamic language, the performances cannot compete with a static one like C++
Memory management is not accessible because of the GC.
XNA is cool, but you won't make an AAA game.
and MOgre wraps a nice C++ engine :)
I looked also at Neo Axis Engine, which was really nice, I was impressed.
but in all those cases, C# is the language "on top"
Last edited by syd on Mon Jun 09, 2008 8:11 pm, edited 3 times in total.
User avatar
xavier
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 9481
Joined: Fri Feb 18, 2005 2:03 am
Location: Dublin, CA, US
x 22

Post by xavier »

TG_Jones wrote:Then .NET does not fit into the 3D computer graphics world. As I posted in the Ogre3D threads I have a big problem with WinForms and Ogre3D. I certainly blame .NET.
It's so much easier than admitting you don't know what you're doing, I agree...

.NET fits fine in 3D graphics. You can either use Managed DX, or a managed wrapper like Mogre around a library such as Ogre, and those work fine. It also is a stellar environment for developing tools for developing games.

You sound frustrated -- perhaps step back a bit, take a deep breath and revisit?
Do you need help? What have you tried?

Image

Angels can fly because they take themselves lightly.
jjp
Silver Sponsor
Silver Sponsor
Posts: 597
Joined: Sun Jan 07, 2007 11:55 pm
Location: Cologne, Germany
Contact:

Post by jjp »

syd wrote:I agree that C# does not fit into the 3D real time world.
Since it's a dynamic language, the performances cannot compete with a static one like C++
C++ is of course ahead in terms of performance because there are things the compiler can do with a language like C++ that can't be done with a language compiled at runtime. And not to forget the many years of optimization that have gone into C++ compilers make a big difference (if anyone around here has ever tried XNA on XBox360.. the C# compiler on that platform in it's current version is just dumb in regards to performance optimizations).

But I don't think it is a fundamental issue. After all for some optimizations it is the other way around. Automatic memory management can as well help performance (you can have better cache efficiency for example). With more research and work put into virtual machines and compilers I guess they can get quite a bit closer in terms of performance to C++ than they are today.

Anyways, not every realtime 3d application is a bleeding edge AAA title that tries to push hardware as much as possible. For less demanding applications I think the gained productivity and convenience already make C# or Java a viable choice.

EDIT: I misunderstood what syd meant by 'static' and 'dynamic'. Corrected the posting.
Last edited by jjp on Mon Jun 09, 2008 9:53 pm, edited 1 time in total.
Enough is never enough.
TG_Jones
Halfling
Posts: 53
Joined: Thu May 29, 2008 4:05 pm

Post by TG_Jones »

Unless it's a typical CAD program, why would I use WinForms? XNA? Managed DX, deprecated, MOGR does not work at all, crashing...so you still think it fits in 3D? Even Python can do much better, don't agree? disagree? Name a commercial 3D title written in C#, Maya? LW3D? Softimage? GIMME A BREAK! sorry, but since it's a free forum, I like to flame a ware :lol:
jjp
Silver Sponsor
Silver Sponsor
Posts: 597
Joined: Sun Jan 07, 2007 11:55 pm
Location: Cologne, Germany
Contact:

Post by jjp »

TG_Jones wrote:Name a commercial 3D title written in C#
http://arenawars.net/
Enough is never enough.
TG_Jones
Halfling
Posts: 53
Joined: Thu May 29, 2008 4:05 pm

Post by TG_Jones »

Only one not-CAD, and it does not use WinForms.
User avatar
syd
Gnome
Posts: 362
Joined: Thu May 01, 2008 1:55 am
Location: Paris, France

Post by syd »

jjp wrote:
I don't think it is a fundamental issue. After all there are optimizations that can be done with a dynamic language which can't be done with a static one. Automatic memory management can as well help performance (you can have better cache efficiency for example). With more research and work put into dynamic languages I guess they can get quite a bit closer in terms of performance to C++ than they are today.
well I'm not a compiler expert, but I really doubt that a dynamic language can compete.
I'm sure Microsoft didn't start their C# compiler from scratch, they built it on top of their C++ one. Logically speaking, dynamical means that types are generated in memory at runtime, while types in statical languages are used for development time, at the end a C++ binary as no idea about inheritance or any of theses stuff, everything is addresses and indirections. I don't see how the dynamical can beat the static...

However I agree that a C# game can do a nice job. but I would not bet on it for the graphic engine :)

TG_Jones wrote:Only one not-CAD, and it does not use WinForms.
TG_Jones, it's true that Winforms is far from being the fastest GUI library. Its strength is somewhere else. If you are not planning to make thousands of widgets that rolls over the form, I don't get the point.
What anyone see here is that you are not debating, you are just bored and try to find some activity.
If you really can't make C# working fine, I wonder how you're doing in C++.

edit: english mistakes corrected
Last edited by syd on Mon Jun 09, 2008 9:09 pm, edited 1 time in total.
blutzeit
Gnoblar
Posts: 10
Joined: Tue Jun 26, 2007 11:00 am

Post by blutzeit »

No C# is not a dynamic language. It's statically typed and linked just as C++. I have spent numerous years with both and have to admit I love them both.

True, the C# 3.0 language is not as small clean as it used to be. I always thought of LINQ as yet-another-syntactic-sugar for SQL. But then I stumbled across http://brahma.ananthonline.net/, which looks like a really nice application of LINQ in a GPU context. Anyone given it a closer look?

/felix, feeling it's time to go off-topic before the thread enters the infinite loop of death
User avatar
syd
Gnome
Posts: 362
Joined: Thu May 01, 2008 1:55 am
Location: Paris, France

Post by syd »

blutzeit wrote:No C# is not a dynamic language. It's statically typed and linked just as C++. I have spent numerous years with both and have to admit I love them both.
So...how do you explain the Reflection library, that allow to create types, add methods and so on at runtime?

I looked at the C# article on wikipedia, here is an interresting statement:
By design, C# is the programming language that most directly reflects the underlying Common Language Infrastructure (CLI). Most of C#'s intrinsic types correspond to value-types implemented by the CLI framework. However, the C# language specification does not state the code generation requirements of the compiler: that is, it does not state that a C# compiler must target a Common Language Runtime (CLR), or generate Common Intermediate Language (CIL), or generate any other specific format. Theoretically, a C# compiler could generate machine code like traditional compilers of C++ or FORTRAN; in practice, all existing C# implementations target CLI.
To me, it sounds like only native types are static, but it's just a speculation...
User avatar
johnhpus
Platinum Sponsor
Platinum Sponsor
Posts: 1186
Joined: Sat Apr 17, 2004 2:49 am
x 3

Post by johnhpus »

As a C++ programmer, I have found that C# is great for doing small-ish GUI stuff, like tools. It might take me a week to do in MFC what I can do in C# in a day or two.

That's not to say you can't write large projects in C#. I just wouldn't choose to, in part because I have a zealous love of C++, and in part because I can't imagine any language doing OO any better than C++ does, and so far C# doesn't match its flexibility.

I can express my thoughts in C++. I can translate my thoughts into C#.
blutzeit
Gnoblar
Posts: 10
Joined: Tue Jun 26, 2007 11:00 am

Post by blutzeit »

So...how do you explain the Reflection library, that allow to create types, add methods and so on at runtime?
Ah, ok, you're right, in theory, yes. In practice, with MS or mono compilers, you get your CIL which is jitted to machine code. With libtcc/tinyc I belive you can compile and execute C++ in C++, does that make C++ dynamic? ;)
User avatar
xavier
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 9481
Joined: Fri Feb 18, 2005 2:03 am
Location: Dublin, CA, US
x 22

Post by xavier »

TG_Jones wrote:Unless it's a typical CAD program, why would I use WinForms? XNA? Managed DX, deprecated, MOGR does not work at all, crashing...so you still think it fits in 3D? Even Python can do much better, don't agree? disagree? Name a commercial 3D title written in C#, Maya? LW3D? Softimage? GIMME A BREAK! sorry, but since it's a free forum, I like to flame a ware :lol:
Mogre works fine for me -- again, it sounds like the problem is you, not the tools or technology.
Do you need help? What have you tried?

Image

Angels can fly because they take themselves lightly.
Locked