getattr(CSharp, "Pythonic") += 1
July 24, 2007 12:47 AM
Subscribe
Hilarious, but earnest: how can I make C# more like Python?
I hate C# very much, but it's a work requirement. I'm used to Python and C (and various intermediate/assembly languages) as a baseline.
Over the years, I've done contracts which required me to use C#, Java and C++, but I despise object orientation as it stands in "Enterprise-class" languages.
Python, on the other hand, provides me with instant reflection, lots of options for dynamic attribute access, freedom from casting (viz. duck typing) and Pyrex, one of the best glue languages outside of C itself (C++/CLI makes me weep with frustration.)
If I'm going to use this language for work — and it's the language that matters — how can I add my own semantic sugar and make it all Pythonic with goodness and happy?
Primarily important to me are: calling SQL stored procedures as if they were methods (think SQLAlchemy,) Python-style reflection, generators (I know I need to implement IEnumerator – but how?) and IL generation (if all else fails.)
posted by electronslave to technology (18 comments total)
posted by zixyer at 12:58 AM on July 24, 2007 [5 favorites]