Well I didn't get as far as I'd like over the last few weeks (too much work, sick, etc...) , but I started my foray into Python. For now I've decided to just use IDLE since it comes with Python. I'll dig into other IDEs when I get a little more experience. IDLE seems like a decent environment but I must say that I miss Visual Studio. I'm reading Dive Into Python by Mark Pilgrim to get started. I'm five chapters in and I like the format of the book. It assumes that you already know how to program so it doesn't waste any time and you start working with the language right away.
As I go through the features of Python I keep comparing it to Java or C#. Dynamic typing is a bit different but I like that fact that you can't reference something you haven't assigned to (damn you VBScript!). It's still a strongly typed language so that's the same. Introspection is cool but the aforementioned languages have Reflection to mirror that. Functions, and everything else for that matter, are objects so you can pass them off to anything. I like that and my first guess about mapping that functionality to C# would be through delegates. I'd have to write some test code and play around with both to make any determinations. Maybe I'll make that a personal assignment over the next week. Lambda functions look like a great tool and to be honest I'm not sure that C# has an equivalent. Another thing that I'll have to do a little research on. The one feature that stood out as a definite advantage over C# is the interactive shell. I do like being able to test and run code on the fly without compiling. This feature seems like an invaluable tool for developing stuff fast while keeping it free of obvious bugs. I've heard this as a major argument for Lisp. In fact, certain Lisp hackers will say that the languages of today are only trying to catch up with the functionality that Lispers have enjoyed for decades. But for now, back to Python. List comprehension and lists in general are sweet. Fewer lines of code and quicker to work with than ArrayList. All in all, I like what I'm seeing. At the very least, this Python effort is causing me to look at C# in different ways. At this point there are two little homework projects I'd like to assign myself.
- I want to see if C# supports anything like lambda functions. Produce sample code in Python and C# with an examination of both methods.
- Python supports easy mapping to functions and in fact you can call to a function at runtime without knowing its name beforehand. Is there a way to do this in C#? Again, produce sample code in both languages.
I also need to start thinking about a project that I can implement in Python. I have two projects that I want to start right now but I'll save that discussion for another post...
Comments