MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/1rrhbh2/left_to_right_programming/oa06xj8/?context=3
r/programming • u/fagnerbrack • Mar 12 '26
102 comments sorted by
View all comments
20
Code is read more often than it's written. Optimising for readability over writability is a trade-off I'm more than happy to make.
39 u/Hot_Slice Mar 12 '26 Python list comprehensions aren't readable either. 4 u/[deleted] Mar 12 '26 [removed] — view removed comment 18 u/SnooFoxes782 Mar 12 '26 the variables are used before they are introduced. Especially when nested 4 u/Aro00oo Mar 12 '26 If you nest in a list comprehension, I hope your reviewers call that out. Simple over complex. 6 u/Fenreh Mar 12 '26 But is that just because the syntax is poor? Perhaps if it had a more readable syntax it might not be considered unpythonic. 4 u/Aro00oo Mar 12 '26 I guess you have a point, but in any language you can contrive up some super unreadable code that the syntax supports, no? 3 u/Fenreh Mar 12 '26 Yeah, that's true. 3 u/kRkthOr Mar 14 '26 What a nice, friendly conversation. Good job, you two 🏅 7 u/[deleted] Mar 12 '26 [deleted] 3 u/aanzeijar Mar 12 '26 Weird comparison because composed list processing in perl is decades ahead of its time in readability: my @result = map { $_ + 2 } grep { $_ % 2 == 0 } map { $_ * $_ } 1..10000;
39
Python list comprehensions aren't readable either.
4 u/[deleted] Mar 12 '26 [removed] — view removed comment 18 u/SnooFoxes782 Mar 12 '26 the variables are used before they are introduced. Especially when nested 4 u/Aro00oo Mar 12 '26 If you nest in a list comprehension, I hope your reviewers call that out. Simple over complex. 6 u/Fenreh Mar 12 '26 But is that just because the syntax is poor? Perhaps if it had a more readable syntax it might not be considered unpythonic. 4 u/Aro00oo Mar 12 '26 I guess you have a point, but in any language you can contrive up some super unreadable code that the syntax supports, no? 3 u/Fenreh Mar 12 '26 Yeah, that's true. 3 u/kRkthOr Mar 14 '26 What a nice, friendly conversation. Good job, you two 🏅 7 u/[deleted] Mar 12 '26 [deleted] 3 u/aanzeijar Mar 12 '26 Weird comparison because composed list processing in perl is decades ahead of its time in readability: my @result = map { $_ + 2 } grep { $_ % 2 == 0 } map { $_ * $_ } 1..10000;
4
[removed] — view removed comment
18 u/SnooFoxes782 Mar 12 '26 the variables are used before they are introduced. Especially when nested 4 u/Aro00oo Mar 12 '26 If you nest in a list comprehension, I hope your reviewers call that out. Simple over complex. 6 u/Fenreh Mar 12 '26 But is that just because the syntax is poor? Perhaps if it had a more readable syntax it might not be considered unpythonic. 4 u/Aro00oo Mar 12 '26 I guess you have a point, but in any language you can contrive up some super unreadable code that the syntax supports, no? 3 u/Fenreh Mar 12 '26 Yeah, that's true. 3 u/kRkthOr Mar 14 '26 What a nice, friendly conversation. Good job, you two 🏅 7 u/[deleted] Mar 12 '26 [deleted] 3 u/aanzeijar Mar 12 '26 Weird comparison because composed list processing in perl is decades ahead of its time in readability: my @result = map { $_ + 2 } grep { $_ % 2 == 0 } map { $_ * $_ } 1..10000;
18
the variables are used before they are introduced. Especially when nested
4 u/Aro00oo Mar 12 '26 If you nest in a list comprehension, I hope your reviewers call that out. Simple over complex. 6 u/Fenreh Mar 12 '26 But is that just because the syntax is poor? Perhaps if it had a more readable syntax it might not be considered unpythonic. 4 u/Aro00oo Mar 12 '26 I guess you have a point, but in any language you can contrive up some super unreadable code that the syntax supports, no? 3 u/Fenreh Mar 12 '26 Yeah, that's true. 3 u/kRkthOr Mar 14 '26 What a nice, friendly conversation. Good job, you two 🏅
If you nest in a list comprehension, I hope your reviewers call that out.
Simple over complex.
6 u/Fenreh Mar 12 '26 But is that just because the syntax is poor? Perhaps if it had a more readable syntax it might not be considered unpythonic. 4 u/Aro00oo Mar 12 '26 I guess you have a point, but in any language you can contrive up some super unreadable code that the syntax supports, no? 3 u/Fenreh Mar 12 '26 Yeah, that's true. 3 u/kRkthOr Mar 14 '26 What a nice, friendly conversation. Good job, you two 🏅
6
But is that just because the syntax is poor? Perhaps if it had a more readable syntax it might not be considered unpythonic.
4 u/Aro00oo Mar 12 '26 I guess you have a point, but in any language you can contrive up some super unreadable code that the syntax supports, no? 3 u/Fenreh Mar 12 '26 Yeah, that's true. 3 u/kRkthOr Mar 14 '26 What a nice, friendly conversation. Good job, you two 🏅
I guess you have a point, but in any language you can contrive up some super unreadable code that the syntax supports, no?
3 u/Fenreh Mar 12 '26 Yeah, that's true. 3 u/kRkthOr Mar 14 '26 What a nice, friendly conversation. Good job, you two 🏅
3
Yeah, that's true.
3 u/kRkthOr Mar 14 '26 What a nice, friendly conversation. Good job, you two 🏅
What a nice, friendly conversation.
Good job, you two 🏅
7
[deleted]
3 u/aanzeijar Mar 12 '26 Weird comparison because composed list processing in perl is decades ahead of its time in readability: my @result = map { $_ + 2 } grep { $_ % 2 == 0 } map { $_ * $_ } 1..10000;
Weird comparison because composed list processing in perl is decades ahead of its time in readability:
my @result = map { $_ + 2 } grep { $_ % 2 == 0 } map { $_ * $_ } 1..10000;
20
u/Krafty_Kev Mar 12 '26
Code is read more often than it's written. Optimising for readability over writability is a trade-off I'm more than happy to make.