c# vs python

I'm all in with Python. Used to code in C# but now Python is the thing... cross platform... tons of libraries... and really easy.
 
I would suggest if You are begginer and You are working on a big project go with c#,even better go with java as python can get pretty hard to debug when project gets bigger , if done wrong.

All shorter bots etc , definitely go with python.
 
I'm all in with Python. Used to code in C# but now Python is the thing... cross platform... tons of libraries... and really easy.


like i said before go with C++ if you want to go with multi platform.. if you want to go with the scripting language then go with python if you want to go with programming language then simply go with c# or c++, but to be honest everybody has their own language... just try both and pick the one that you are comfortable with it, Let's say you just wanna build bot's then go with c# many tutorials out there and overall more possibility's.
 
1987 - Larry Wall falls asleep and hits Larry Wall's forehead on the keyboard. Upon waking Larry Wall decides that the string of characters on Larry Wall's monitor isn't random but an example program in a programming language that God wants His prophet, Larry Wall, to design. Perl is born.

source
 
I'd vote for C# simply because it leaves you the option of packaging your work and selling licenses. Sure, you can develop online services with web scripting, but you can find your way around asp.net with C# too.
 
Python is working for me big time haven't had much success with c# java but with python i've been able to scrape, automate, scientific calculation, made a working software (still improving one) and enter into the Mobile market like programming for android using kivy and right now SL4A...prolly the best for now!!
 
As I've been programming in c/c++/java/ruby/python/php/asm for quite a whie I feel like I have to clear some things up over here, as there is so much missinformation in this topic.

Is C# better than Python? NO
Is Python better than C#? NO

Both languages have their ups and downs.
Here are some:
Python:
-cross-platform
-easy to learn
-fast development
-there is a library for anything you can think of (like they say, "batteries included")
-can be used to develop web apps with a framework like Django

C#
-Programming over Windows is a little bit easier compared to Python
-A little bit faster then Python
-Easier to find a job as a C# developer

Some people said C# is much more powerfull then Python. They can't be futher away from the truth than that. The standard Python library contains everything you need for 99% of the projects you will be doing, and there are literarly thousands (if not more) free libs on the internet if you need to be doing something more specific. More then that, if there is no lib to fit your need, you can write one yourself in C or C++, export it as a python library and use it from python. There is also a library called ctypes that let's you import any windows '.dll' file so absolutely anything you can do in C# you can do in python too.

If you give me just one example of an app that you can't do in python I'll shut my mouth.

Someone also said that you can't sell python programs to clients because they will see the source code. Again, that couldn't be further away from the truth. There are programs that can be used to compile python scripts, like py-installer, and you get a single '.exe' file just like you could do in C#.

Pick any of the two languages, as both will fit your needs. You can't go wrong. But don't listen to all those guys that have no idea what they are talking about.
 
As I've been programming in c/c++/java/ruby/python/php/asm for quite a whie I feel like I have to clear some things up over here, as there is so much missinformation in this topic.

Is C# better than Python? NO
Is Python better than C#? NO

Both languages have their ups and downs.
Here are some:
Python:
-cross-platform
-easy to learn
-fast development
-there is a library for anything you can think of (like they say, "batteries included")
-can be used to develop web apps with a framework like Django

C#
-Programming over Windows is a little bit easier compared to Python
-A little bit faster then Python
-Easier to find a job as a C# developer

Some people said C# is much more powerfull then Python. They can't be futher away from the truth than that. The standard Python library contains everything you need for 99% of the projects you will be doing, and there are literarly thousands (if not more) free libs on the internet if you need to be doing something more specific. More then that, if there is no lib to fit your need, you can write one yourself in C or C++, export it as a python library and use it from python. There is also a library called ctypes that let's you import any windows '.dll' file so absolutely anything you can do in C# you can do in python too.

If you give me just one example of an app that you can't do in python I'll shut my mouth.

Someone also said that you can't sell python programs to clients because they will see the source code. Again, that couldn't be further away from the truth. There are programs that can be used to compile python scripts, like py-installer, and you get a single '.exe' file just like you could do in C#.

Pick any of the two languages, as both will fit your needs. You can't go wrong. But don't listen to all those guys that have no idea what they are talking about.

I'm a lover of python and mostly agree with you on everything you've said above (especially on neither python or C# being better or worse off). However, I do feel like I should point out a couple of things. I do agree with you that Python can handle any type of task (and so can C#), this is mostly true. The question though isn't whether Python or C# for that matter can handle a given task, its more (at least I believe so) about handling that task well.

I'll give you a couple of examples.
Speed. Now in most cases it wouldn't matter much (unless you are scaling). Also, a lot of speed concerns come from badly written code, so a ton of stuff can be optimized away. That being said, you just can't do a ton of optimization with dynamic languages. In contrast, static languages allow a wide array of optimization procedures before ever compiling any of your code. So you are left with optimizing the runtime itself, which in the case of a dynamically typed language needs to do the majority of the work, this is not the easiest of tasks.

This (and other factors that I'm not gonna get into now) does result in speed differences beyond "A little bit faster then Python". Most benchmarks put Python anywhere in the 3-300 times slower than C# range. Benchmarks need to be taken with a grain of salt though, so draw your own conclusions. It also needs to be said that if speed is the primary concern you shouldn't be using either.

Multithreading/Parallelization. http://www.jeffknupp.com/blog/2012/03/31/pythons-hardest-problem/

There are some other pretty small issues in Python, mostly pedantic stuff though which I won't mention here (same could be said of C#). And I agree with you, Python has absolutely amazing libraries. Some stat libraries are really, really powerful and I'm consistently amazed at how easy they are to use. Also, python excels in sheer productivity (then again, there are some pretty productive programmers in net land). Overall, both languages are pretty solid and as I've said above do not present massive paradigm differences. Just choose the right language to do the job and you are good.

Cheers
 
About the speed differences... In my personal experience, when it comes to botting, programs will be spending 95% of their execution time waiting for something (like a web server to respond or some button/image to appear on the screen).
Bots don't usually solve complicated mathematical formulas that need millions of operations/second, so although C# might be up to 100 times faster then python when it comes to rendering a video or who knows what... they will be just as fast when it comes to bots.
However, bot development in python is much faster, so you got to ask yourself: Would I rather code a bot in 2 days (python) or would I rather code a bot that's 5-10% faster (at most) in 2 weeks (C#)?
 
About the speed differences... In my personal experience, when it comes to botting, programs will be spending 95% of their execution time waiting for something (like a web server to respond or some button/image to appear on the screen).
Bots don't usually solve complicated mathematical formulas that need millions of operations/second, so although C# might be up to 100 times faster then python when it comes to rendering a video or who knows what... they will be just as fast when it comes to bots.
However, bot development in python is much faster, so you got to ask yourself: Would I rather code a bot in 2 days (python) or would I rather code a bot that's 5-10% faster (at most) in 2 weeks (C#)?

Oh yeah I definitely agree.
Most botting tasks are I/O bound, so the speed difference is besides the point. I just thought I'd mention it anyhow in order to provide a more complete picture. Also, productivity wise, C# is up there as well. It does provide enough abstraction I believe. LINQ (when used correctly) is also pretty awesome (and I appreciate MS embracing some FP concepts).

Where I believe C# suffers greatly is for example readability (its not opinionated enough about its syntax). This is IMHO but I think Python is miles ahead here. Also, overuse of LINQ can cause readability problems as well. A ton of code is too clever for its own good... Readability suffers. You might say here that this will of course affect productivity and I'd agree with you.

Maybe I'm just biased though, I'm not too into C# itself and don't have a ton of experience there. Did have to maintain a larger net code base once and the whole thing left a sour taste in my mouth... But again, it might just be me.
 
Would I rather code a bot in 2 days (python) or would I rather code a bot that's 5-10% faster (at most) in 2 weeks (C#)?

2 days, 2 weeks ? I code bots(for personal use) in a matter of hours(C#), of course no fancy GUIs - Registration, Email validation, Posting, Scraping, etc. You can create templates in Visual Studio and re-use the code. Developing a commercial software will take time no matter what the programming language is.

Where I believe C# suffers greatly is for example readability (its not opinionated enough about its syntax).
I don't see how C# suffers in readability, the syntax is very similar to C++.

Also, overuse of LINQ can cause readability problems as well.
I agree with that statement, but IF only you are using LINQ operators(select, group by, where, order by, from in, etc.) and not the extension functions.I don't think that any other language has a GroupBy over a collection of objects, at least not out of the box.
However, LINQ is slow and shouldn't be overused.
 
2 days, 2 weeks ? I code bots(for personal use) in a matter of hours(C#), of course no fancy GUIs - Registration, Email validation, Posting, Scraping, etc. You can create templates in Visual Studio and re-use the code. Developing a commercial software will take time no matter what the programming language is.


I don't see how C# suffers in readability, the syntax is very similar to C++.


I agree with that statement, but IF only you are using LINQ operators(select, group by, where, order by, from in, etc.) and not the extension functions.I don't think that any other language has a GroupBy over a collection of objects, at least not out of the box.
However, LINQ is slow and shouldn't be overused.

And we all know that C++ (with its function/operator overloading, burring functions deep in some forgotten namespaces, spaghetti classes, convoluted templates and macros, etc. etc.) is the epitome of readability... Disclaimer: I have a love/hate type of relationship with C++
Fortunately C# is much, much better here.

In regards to LINQ, people tend to use it with an SQL mindset instead of a functional mindset. Here C# could have been more opinionated, but thats just my humble opinion. Others prefer little to no formatting enforcement, I for one think that its proportionally important in relation to your LOC count.

As for LINQ itself, I see it as a welcoming addition to C#. Sometimes expressing the intent rather than the crude mechanics is advantageous (which is the whole point of FP). So its a good first step.

I don't think that any other language has a GroupBy over a collection of objects, at least not out of the box.

Unless groupby isnt what I think it is, Haskell or ocaml (and many others) come to mind. Groupby is nothing new really any language that embraces FP paradigms will allow you to manipulate data in this way. LINQ itself didn't invent any of these concepts, its just a very (very) nice FP implementation in an otherwise (people will disagree here) imperative world. Before LINQ was LINQ it was actually called lisp.
 
People will go back and forth with this question, but to put it in simple terms:

Both of them have their pro's and con's. My friend is fluent in Python, and I am fluent in .NET (VB, C#). The time it took me to write a wrapper for the new platform Vine was about 4-5 hours of debugging and decompiling their mobile application. On the other hand, he was able to produce a fully functional wrapper in an hour.

If you're looking to support multiple platforms, have a efficient script and finish your first prototype ASAP, go for Python. If you want super friendly user interface and all that jazz (also very straight-forward to code), go for C#/VB.
 
They are used for different things... Python is used for rapid development and for more complex string manipulation where C is used for tasks that need to be very fast.

I use Python and C++ but I also recommend using the Qt framework for C++
 
As others have already stated, Python is a dynamic language where as C# is a static/strongly typed language... What this means is that Python is much more easier to program in as it is much more of a relaxed language, you don't have to worry about converting integers to strings, or worrying about what data types an array will hold (an array you can think of as a list), because in Python, once you declare an array it will hold anything of any pretty much any length, and once you get to the more intermediate stuff where multidimensional arrays come in to play, working with it is a blessing.

In C# you pretty much have to declare everything, giving the array as an example, you have to declare how many items will be in that array, what data type it will hold (whether it be numbers or strings or other objects). The list really does go on but I'm sure you get the picture...

If you do decide to learn python, I have an incredible resource that will get you up to intermediate level within a month if you give it all you have.

Unfortunately I'm unable to post links, but search on Google "Udacity" and choose their Intro to Computer Science course, it's completely free of charge and highly interactive ;)
 
Back
Top