python and C#?

  • Thread starter Thread starter John Salerno
  • Start date Start date
J

John Salerno

Hi all. I know I should probably be focusing on one language at a time,
but I'm interested in learning Python (though I don't really know why!).
But I was wondering, does Python complement C# in any way, or would C#
be able to do everything Python can? Would it help to learn Python even
though I want to focus on C#?

Thanks.
 
John Salerno said:
Hi all. I know I should probably be focusing on one language at a time,
but I'm interested in learning Python (though I don't really know why!).
But I was wondering, does Python complement C# in any way, or would C# be
able to do everything Python can? Would it help to learn Python even
though I want to focus on C#?

The two languages aren't terribly similar, as C# is a statically typed
language and Python is largely dynamic and the overall way things are done
differ. Learning both would give you a good feel for some of the differences
that exist in programming languages. By all means learn Python and every
other language you can. The experiance will not harm you in any way, infact,
in my experiance it can be quite benefical.

You could easily achieve most of the same goals in C# as you could in
Python, just as you could pound most nails with any tool. But, like most
tools, each has a specific purpose is in general really good at some things
and not quite so good at others.

There are even a few .NET implementations of Python. IronPython comes to
mind, but there might be others.
 
Daniel said:
The two languages aren't terribly similar, as C# is a statically typed
language and Python is largely dynamic and the overall way things are done
differ. Learning both would give you a good feel for some of the differences
that exist in programming languages. By all means learn Python and every
other language you can. The experiance will not harm you in any way, infact,
in my experiance it can be quite benefical.

You could easily achieve most of the same goals in C# as you could in
Python, just as you could pound most nails with any tool. But, like most
tools, each has a specific purpose is in general really good at some things
and not quite so good at others.

There are even a few .NET implementations of Python. IronPython comes to
mind, but there might be others.

Is there any way (or is it even helpful) to implement Python code within
a C# program? I've read that sometimes you can use a language like
Python to get smaller operations done quickly, but I didn't understand
if this is a separate process, or if these scripts are actually called
from C# code.
 
John Salerno said:
Hi all. I know I should probably be focusing on one language at a time,
but I'm interested in learning Python (though I don't really know why!).
But I was wondering, does Python complement C# in any way, or would C# be
able to do everything Python can? Would it help to learn Python even
though I want to focus on C#?

Depends on the kinds of work that interest you. Python is appropriate for
some uses. C# is a more general langague. You can do everything in C# that
you can do in Python, although the mechanism for doing it would be
different. The same is not true the other way. I would not use Python to
create a service, or an integration layer.

Like I said, it depends on where you want to end up.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
 
Nick said:
Like I said, it depends on where you want to end up.

Hmm, that's the tough part. I'm just learning C# for fun. I'm not a
professional programmer, and I doubt I could be without a formal
background in any computer sciences.

For some reason (honestly, I don't know why) Python has just caught my
interest. In a way, I want to learn about it, but I also don't want to
get confused/distracted from C#, which is what I mainly want to learn.
 
Nick said:
Depends on the kinds of work that interest you. Python is appropriate for
some uses. C# is a more general langague. You can do everything in C# that
you can do in Python, although the mechanism for doing it would be
different. The same is not true the other way. I would not use Python to
create a service, or an integration layer.

Like I said, it depends on where you want to end up.

Oh sorry, I should try to address your point: basically I just want to
learn C# to make fun little apps that I can use for myself, or maybe for
friends. Definitely nothing like business services or anything like
that. But I don't know what Python really does, so I don't know if it
will help if I already know C#.
 
Is there any way (or is it even helpful) to implement Python code within a
C# program? I've read that sometimes you can use a language like Python to
get smaller operations done quickly, but I didn't understand if this is a
separate process, or if these scripts are actually called from C# code.

C# certainly does not provide any built in way to run Python, but if you
want to use python to script applications there is nothing stopping you from
finding or developing a binding to do so. I don't know off hand if one
exists, but I wouldn't be surprised if one does.
 
I think that Python and C# are languages that greatly complement each other.
Especially with IronPython where you can use .Net libraries just like you
would from C#. The real power of Python comes with its interactive
development style. You can literaly see your application being built as you
type, each statement adding to functionality. It makes Python great for
prototyping. I personally found IronPython and C# to be a very powerful
combination.

Martin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top