4 ms·
> Using the case (lowercase for private, uppercase for public) of the first letter of the identifier is perfect for lazy developers like me Similar to Python's
by edflsafoiewq 5y ago
> Using the case (lowercase for private, uppercase for public) of the first letter of the identifier is perfect for lazy developers like me
Similar to Python's _foo. I don't like it because if you want to change the visibility you must change the name at all current use-sites.
- simondotau 5y agoForcing you to change all usages seems like a win, making it harder to accumulate code smells and encouraging you to audit variable use — however briefly — when they change type.
- tayo42 5y agothe _ thing in python ime has been pointless, people will use those functions anyway if they need to. it just makes code ugly and harder to read. i rarely ever prefix a function with an _
- noitpmeder 5y agoI like it because it's an easy way to signal intent. Sure someone can still use it if they want, but it effectively communicates my desire that you _should not_ use this. I'm open to other suggestions for how to effectively communicate the public interface without maintaining some separate documentation.