At the time of asking, I am using Python most of the time, and I have not used Java or C# much, although I have a (basic) idea of how they work. I am thinking to possibly start to use Java or C# more, but it seems from the little I know about them that they aren't as "customizable" as Python, but I may be wrong.
By "customizable" (there is probably better phrases to use to describe what I mean, but I can't think of anything better :-) ), I mean things in Python like:
- Dynamic object attributes definition (using
__getattr__
, etc.) - Import hooks (so code modules can be imported from any type of media, not just files which match certain sets of criteria)(see PEP 302 -- New Import Hooks, and this Stackoverflow question)
- Operator overloading (I think that C# and Java both have this, but it is another example)
- Subclassing of built in types
- Mappings and sequence simulation using
__getitem__
,__setitem__
, and__delitem__
, etc., "magic" methods
So, I am wondering if there are (at least some of) these "customization" kinds of things in Java and C#, and if not, are there functionally similar or equivalent ways to do these kinds of things?