Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


C#? or C flat? ._.
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
XaLeX
Expert Cheater
Reputation: 0

Joined: 19 Aug 2008
Posts: 226

PostPosted: Sat Jul 10, 2010 2:12 am    Post subject: C#? or C flat? ._. Reply with quote

I mean, looks like an idiot language to me... basically it's c++ with all the stuff that made it cool (they say unstable) ripped off.

.. think about it:

    - pointers, they don't exist anymore. you have to make your whole program "unsafe" to be able to use them, and you also need a fixed assignment. madness.
    - variable shadowing, not very important but it's stupid that they took it off. it does NOT cause confusion if you know what you're doing.
    - int to bool automatic cast. God, i loved this one. complex expressions with this were my favourite. sigh.
    - then they added garbage collecting. well, less stress for the programmer, but it fucks with pointers.


and finally, the one that shocked me most.. null.
NULL! COME ON! they took null away and implemented a whole friggin interface and stuff to use it. THIS IS MADNESS.
it's like adding an intermediate object before sending output to cout. "the user might not have a display, we'd better implement a huge class to check it first."

plus they added properties. ok, they're cool, but do we really need them? programmers are the laziest people around, we know, but is it so hard to write
Code:
int getValue() {return value;}
void setValue(int _value) {value = _value;}

..?

I'd like to hear your opinion about this. Mine is that c# is actually flexible and less error prone, but it's an insult to programmers.
Back to top
View user's profile Send private message
Flyte
Peanuts!!!!
Reputation: 6

Joined: 19 Apr 2006
Posts: 1888
Location: Canada

PostPosted: Sat Jul 10, 2010 2:45 am    Post subject: This post has 2 review(s) Reply with quote

My opinion is that you're an idiot. You do not need pointers in order to program. C# brings type safety, code security, a focused object oriented design, a better library (.NET), and countless other benefits.

C# is not the same as C++. They are not used for the same things. They should not be compared.
Back to top
View user's profile Send private message
XaLeX
Expert Cheater
Reputation: 0

Joined: 19 Aug 2008
Posts: 226

PostPosted: Sat Jul 10, 2010 2:56 am    Post subject: Reply with quote

Have you tried using windows.h functions in c#? that's what drove me crazy.
They're written to be used in C++, and in C# the compatibility is like, zero.
I spent a day correcting stupid errors and i had to get around functions that had a pointer parameter with fixed(..) and stuff. This is not compatibility >_<
Back to top
View user's profile Send private message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5802

PostPosted: Sat Jul 10, 2010 4:12 am    Post subject: Reply with quote

The Win32 API is C, not C++... and there's usually a managed equivalent to whatever you're trying to do. When there isn't, pinvoke.net is lovely.

and I wouldn't be writting get / setters for something so trivial as that. :\
Back to top
View user's profile Send private message
tombana
Master Cheater
Reputation: 2

Joined: 14 Jun 2007
Posts: 456
Location: The Netherlands

PostPosted: Sat Jul 10, 2010 4:12 am    Post subject: Reply with quote

XaLeX wrote:
Have you tried using windows.h functions in c#? that's what drove me crazy.
They're written to be used in C++, and in C# the compatibility is like, zero.
I spent a day correcting stupid errors and i had to get around functions that had a pointer parameter with fixed(..) and stuff. This is not compatibility >_<

It's because those functions are not meant to be used in C#. In C# you're supposed to use the .NET library.
I myself like C++ more right now because of the stuff you said, working with pointers and so on, though I think that if I would be a professional programmer then I would prefer C# over C++ for the reasons Flyte specified.
Back to top
View user's profile Send private message
XaLeX
Expert Cheater
Reputation: 0

Joined: 19 Aug 2008
Posts: 226

PostPosted: Sat Jul 10, 2010 4:40 am    Post subject: Reply with quote

set the winapi aside (it was just an example)
i think that a professional programmer knows what he's doing, and a language that warns you for everything would waste his time.. as i said i'm working on a little project and wasted something like 20 hours only to search error codes >_>
Back to top
View user's profile Send private message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5802

PostPosted: Sat Jul 10, 2010 4:59 am    Post subject: Reply with quote

what you think is silly
Back to top
View user's profile Send private message
XaLeX
Expert Cheater
Reputation: 0

Joined: 19 Aug 2008
Posts: 226

PostPosted: Sat Jul 10, 2010 8:08 am    Post subject: Reply with quote

hmm ok ._. i thought there would have been some sort of serious conversation.. nevermind.
Back to top
View user's profile Send private message
Burningmace
Grandmaster Cheater
Reputation: 5

Joined: 17 Feb 2008
Posts: 517
Location: The Delta Quadrant

PostPosted: Sun Jul 11, 2010 8:09 am    Post subject: Reply with quote

You seem to have a very misguided and negative view of C# as a language, and are backing it up with rather redundant arguments. Pointers are not necessary since everything is held within its own manages object wrapper. If you ever need to get a real unsafe pointer to an object, you still can (see Marshal and other Reflection/PInvoke stuff). The Win32 APIs are still perfectly accessible through PInvoke and you usually don't have to put any work in to use them (passing structs is an exception but they're still not that difficult or cumbersome) so I can't see why that invalidates it either, especially considering that a very large proportion of the API is conveniently available via the framework.

You are ignoring the fact that C# is not a down-and-dirty language like C is, rather it is a RAD OO language designed to make the development of programs quick, easy and painless.

If you are getting warnings, it is because you are writing bad code. It's understandable too, since you're obviously new to the language. Remember back to when you were learning C, how many errors and warnings did you get back then when learning the ropes? When I migrated from VB6 to VB.NET, it took several months to get to grips with the new language constructs and classes. Don't take your frustration out on the language just because it's an easy target, stick with it and learn precisely what it does best and how to utilise it to its full potential.

_________________
It's not fun unless there's CFG+HiASLR+SEHOP+DEP.


Last edited by Burningmace on Sun Jul 11, 2010 8:17 am; edited 1 time in total
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 151

Joined: 25 Jan 2006
Posts: 7789
Location: 127.0.0.1

PostPosted: Sun Jul 11, 2010 8:09 am    Post subject: Reply with quote

Flyte wrote:
My opinion is that you're an idiot. You do not need pointers in order to program. C# brings type safety, code security, a focused object oriented design, a better library (.NET), and countless other benefits.

C# is not the same as C++. They are not used for the same things. They should not be compared.


This pretty much sums it up. (Minus the idiot part.)

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
XaLeX
Expert Cheater
Reputation: 0

Joined: 19 Aug 2008
Posts: 226

PostPosted: Sun Jul 11, 2010 4:30 pm    Post subject: Reply with quote

Burningmace wrote:
[...]
Woo. Finally a nice person. =)

Anyway, i think my first post was quite exaggerate, for two main reasons: first, i had just trashed the whole project i was working on because those errors and warnings were driving me crazy; second, most important, the fact that c# hides all low-level things bugs me because that's what makes programming funny for me (for example, I love pointer arithmetics and in general what makes the code less easy to understand).
Despite this being against programming itself, as, from a general point of view, new programming languages are constantly born (and existing ones are modified) to be closer to the human way of thinking than to the machine's, i just can't help it.
So, if i'll ever be a serious programmer, I guess I'll either have to change my way of thinking or at least keep my one-line-algorithms as far as possible from the users Razz
Back to top
View user's profile Send private message
Flyte
Peanuts!!!!
Reputation: 6

Joined: 19 Apr 2006
Posts: 1888
Location: Canada

PostPosted: Sun Jul 11, 2010 11:40 pm    Post subject: Reply with quote

Then you may wish to try an esoteric language (aka a 'write only' language). The most famous of them being: Brainfuck, Malbolge, and Perl.
Back to top
View user's profile Send private message
XaLeX
Expert Cheater
Reputation: 0

Joined: 19 Aug 2008
Posts: 226

PostPosted: Mon Jul 12, 2010 12:33 pm    Post subject: Reply with quote

yeah, I already tried brainfuck (and liked it very much =D) but it isn't so practical.. xD
about perl, i love the fact that you can summarize.. like.. 10 c++ lines in only one statement D:
and malbolge.. will keep me busy for the next week Very Happy
Back to top
View user's profile Send private message
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1858

PostPosted: Mon Jul 12, 2010 2:22 pm    Post subject: Reply with quote

If you love short one-liners.. go learn K or Q. K especially, is damn badass.
Back to top
View user's profile Send private message
bhpianist
Cheater
Reputation: 1

Joined: 17 Apr 2010
Posts: 38

PostPosted: Mon Jul 12, 2010 3:00 pm    Post subject: Reply with quote

Holy shit, I just read up on Brainfuck. Do people actually code in it?
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites