PickVids

The Forgotten Art of Structured Programming - Kevlin Henney [C++ on Sea 2019]

推荐理由

If you haven't seen it, Kevlin Henney's talk about "The Forgotten Art of Structured Programming"[1] is interesting (if somewhat long in the examples later), and somewhat related. It's not specifically about return early (and a case could be made that it should or should not apply specifically to early return), but it is about if, else, return, and how they affect cognitive load when reading code. 1: [VIDEO]

推荐kbenson · 原文

说明

这是2019年由cpponsea发布的一部演讲,主题归在Software architecture & design。它讲的是structured programming这一支里的具体问题,而不是把整个领域扫一遍。适合已经能看懂基本术语、想继续往下走的人。内容上可以概括成:Kevlin Henney revisits structured programming, from Go To Statement Considered Harmful to block-structured code and object orientation. He argues it still matters for how we write code today.这些读者给出的理由,核心是:HN commenters point to it in discussions of goto, early returns and cognitive load when reading code.讲法不绑某一条新闻,过几年仍然可以当材料看。从2021年到2022年,有2位不同的读者在2个不同月份把它推荐出来,其中明确叫别人去看的有0次。适合一次性看完。讲者把一个判断讲透,演示是在给这个判断配例子。如果已经会了基本定义,就把注意力放在它怎么把structured programming变成能跟着复述的例子。

视频信息

频道
cpponsea
时长
1 小时 29 分
发布年份
2019
在 YouTube 打开

同主题更多

想知道新收录了什么?

可选。只保存这个邮箱,不创建账号,也不拿它登录。