Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Python being a fully dynamic language is always going to have the advantage here over more static languages like C# and Java. Java and C# have also traditionally targeted more conservative markets, making them more conservative by design. Although C# gains more and more dynamic oriented features with each new release. </p> <pre><code>Dynamic object attributes definition (using __getattr__, etc.) </code></pre> <p>This can be accomplished in C# 4.0 using the new dynamic support. With <code>IDynamicObject</code> it's possible to implement "method_missing" (ala Ruby) in C#. However doing this is really against the language's overall intent and "feel", and I've never seen it done in practice (with the possible exception of ASP.NET MVC's ViewBag)</p> <pre><code>Operator overloading </code></pre> <p>C# has operator overloading. However in my experience it is almost never used.</p> <pre><code>Subclassing of built in types </code></pre> <p>Only if the type is not sealed. If it is sealed, extension methods often do the trick. Many/most built in types in C# are sealed. </p> <pre><code> Mappings and sequence simulation using __getitem__, __setitem__, and __delitem__, etc., "magic" methods </code></pre> <p>Implementing <code>IEnumerable&lt;T&gt;</code> is probably your best bet in C#. This will let your type hook into LINQ and get all kinds of goodies for "free"</p> <p>I have very little experience with Python, my "dynamic language of choice" has been Ruby. I've also professionally worked in C# since it debuted. C# has really come a long ways and has grown into a pretty decent language. It does have a "kitchen sink" feel to it, which can be intimidating at first. But for the most part it does come together well. However, the fluidity, flexibility, power and potential for abuse that Ruby has is not present in C#. A hardcore ruby-ist (and presumably, python-ist) will almost certainly find C# frustrating and limiting. C# is still very much an "enterprise" language, and always will be.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload