Timeline for Why aren't there explicit access modifiers in Python:
Current License: CC BY-SA 3.0
8 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Feb 18, 2015 at 11:29 | comment | added | Basic | @Vector It's hands-down the best glue language I've come across so far, but I wouldn't use it build much more than a service which coordinates other, more complex processes. The woeful threading model alone makes it unsuitable. | |
| May 3, 2013 at 17:26 | comment | added | Vector | @jiggy: "I'm trying so hard to like it". I tried for 2 years - then gave up. :-( Appears to be a scripting language that was hacked to behave somewhat like a real OOP language. I can't imagine writing a large, complex app in Python that was well designed and readable. As you said 'You spend 10X more effort maintaining code than building it'. Simple OOP and type safe concepts require crazy hacks and workarounds. | |
| May 7, 2012 at 14:00 | comment | added | keppla | My example wasnt meant to show different counts of underscores, the use of __init__ was incidental. The example sets some properties of the object, that are not know on compile time, so an explicit access modifier would not help you. | |
| Jul 11, 2011 at 18:19 | comment | added | jiggy | Sorry, I'm still getting my head around Python. I'm trying so hard to like it, but stuff like this drives a little batty. Especially now that I need to remember the meaning of how many underscores a method has. To OP's point, it seems that explicit modifiers would be more clear. Concision is great, but it can't trump clarity. You spend 10X more effort maintaining code than building it. | |
| Jul 11, 2011 at 17:21 | comment | added | keppla | thats not the convention, __x__ are 'magic', (i.e. methods that get called for enabling language integration like operator overloading, iterability, etc.). The convention is _x. | |
| Jul 11, 2011 at 16:21 | comment | added | jiggy | I think this is correct, but IMO, it's terrible. For a language that uses elegance and readability as selling points writing __method__ is pretty heinous-looking and obtuse. | |
| Jul 11, 2011 at 14:09 | history | edited | S.Lott | CC BY-SA 3.0 | added 1 characters in body |
| Jul 11, 2011 at 6:38 | history | answered | keppla | CC BY-SA 3.0 |