Lightning Talk: Whitespace: A Humorous Short Talk - Dan Curran - CppCon 2023

  Рет қаралды 4,288

CppCon

CppCon

13 күн бұрын

cppcon.org/
---
Lightning Talk: Whitespace: A Humorous Short Talk - Dan Curran - CppCon 2023
github.com/CppCon/CppCon2023
i want a holy war over whitespace. the most productive discussion.
---
Dan Curran
working in finance. i like to experiment in language design, and implement proposals for c++ in clang. sometimes.
---
Videos Filmed & Edited by Bash Films: www.BashFilms.com
KZbin Channel Managed by Digital Medium Ltd: events.digital-medium.co.uk
---
Registration for CppCon: cppcon.org/registration/
#cppcon #cppprogramming #cpp

Пікірлер: 19
@MatthewWalker0
@MatthewWalker0 10 күн бұрын
This is my preferred style as well
@sephirostoy
@sephirostoy 11 күн бұрын
I hate that clang-format default to push everything on the right. There are few options to push things back to the left, but it's several options, and they do not cover every cases. There should be a single option for this preference.
@sprytnychomik
@sprytnychomik 11 күн бұрын
Voice of reason.
@Saragan
@Saragan 6 күн бұрын
I do make sure things end on the same indent as the start, it just makes sense, the return type on its own line was a bit much but I would accept it, however the toilet roll in my house will always be at the back :P
@ibbles
@ibbles 12 күн бұрын
I agree.
@fburton8
@fburton8 10 күн бұрын
Putting the toilet roll open edge to the back is a perverse as sitting on the toilet while facing the tank/cistern. I mean, why would you do it??
@AnthonyDentinger
@AnthonyDentinger 12 күн бұрын
Between tabs and spaces, one is obviously superior. So obviously superior that I won’t say which one 😁
@bloodgain
@bloodgain 11 күн бұрын
Kevlin Henney has an excellent talk from 2016 on this with some discussion empirically determining what's more readable: kzbin.info/www/bejne/iYasho1mbtKhra8si=3d0i6gBJgnQb12wX I'm not the first person to say so, but I think 80 characters is a good target, but _just a few extra_ is OK if it prevents wrapping. I go with "soft 80, hard 90" for wrapping: if it's less than 90 characters (and readable as-is), it can go on one line, but if you have to wrap, wrap at 80. If you can't _wrap_ at 80 characters, that's a code smell. That rule plus "functions should fit on roughly 1 screen length, ~50 lines max" has improved my code in every language I've used. It's not so much about the rules themselves as it is about the fact that good code _tends toward readability in the first place._
@KrzysiekPierczyk-uq1du
@KrzysiekPierczyk-uq1du 12 күн бұрын
Okay, after a few years of working as a (clean-code-loving) C++ developer, watching all of these crazy formatting standards in various code bases (because it's standard LLVM/Google/... style, dude) and suffering from not being able to even configure clang-format to obtain such a nice, clean, intuitive formatting I've started to think that something is seriously wrong with my code esthetics. Thanks for telling me that I'm not the only one 😆
@TheMaidenOnes
@TheMaidenOnes 12 күн бұрын
Nice talk :) I do agree with most, except the return type, that is where you pivoted from super hero to villian ;)
@AtomicAndi
@AtomicAndi 12 күн бұрын
There are only two hard problems in CS: Formatting code and naming things.
@VrajPandya
@VrajPandya 11 күн бұрын
.clang-format where?
@therealvbw
@therealvbw 12 күн бұрын
If we're following the patent specification for toilet roll use, surely we should use K&R + C++ standards' formatting? ;)
@ShaunYCheng
@ShaunYCheng 11 күн бұрын
Not sure if I agree that it’s more readable. His suggestion reduces horizontal eye movement but it increases vertical eye movement.
@sprytnychomik
@sprytnychomik 6 күн бұрын
Hint: Books are mostly vertical. Women too.
@usrnm9076
@usrnm9076 12 күн бұрын
120 characters per line and I'll agree. All on one line is better then what clang does but if EVERYTHING is all on one line bwcause you only have 80 characters per line then it gets cumbersome to scroll.
@OskarHersch
@OskarHersch 12 күн бұрын
Blasphemy.
@UrSoMeanBoss
@UrSoMeanBoss 11 күн бұрын
Mate, you bit off more than you could chew, but I like the idea. For anyone who wants to learn more about this subject: Kevlin Henney has done a few great talks about this where he discusses "lines of attention", visual blocking, and so on; focusing on the experience of the reader and educating the audience about common elements of design. Explaining not only what matters, but how and why. Whitespace and style matter more than people think. I feel like this was a poor choice for a lightning talk because the subject definitely needs more time for education, and elaboration. Even if the goal is just to leave breadcrumbs that people can follow up after the talk, it's extremely difficult to do without a very tight script and an extremely skilled presenter. It's not surprising that you fumbled a bit.
Henry Stapp - What Things are Conscious?
9:35
Closer To Truth
Рет қаралды 6 М.
NO NO NO YES! (40 MLN SUBSCRIBERS CHALLENGE!) #shorts
00:27
PANDA BOI
Рет қаралды 110 МЛН
原来小女孩在求救#海贼王  #路飞
00:32
路飞与唐舞桐
Рет қаралды 7 МЛН
Object-oriented Programming in 7 minutes | Mosh
7:34
Programming with Mosh
Рет қаралды 3,7 МЛН
Understanding B-Trees: The Data Structure Behind Modern Databases
12:39
i changed my mind about zig
9:34
Low Level Learning
Рет қаралды 120 М.
Compiling MS-DOS 4.0 using DOSbox & Qemu
17:59
Neozeed
Рет қаралды 2,2 М.
How AI 'Understands' Images (CLIP) - Computerphile
18:05
Computerphile
Рет қаралды 107 М.
Python's 5 Worst Features
19:44
Indently
Рет қаралды 44 М.
Svelte 5: Compiler, Signals, and Web App Performance - JSJ 627
1:21:52
Компьютер подписчику
0:40
Miracle
Рет қаралды 213 М.
Как часто вы чистите свой телефон
0:33
KINO KAIF
Рет қаралды 2,3 МЛН
План хакера 🤯 #shorts #фильмы
0:59
BruuHub
Рет қаралды 1 МЛН
Samsung mobile phone waterproof display. samsung mobile phone digital s23ultra  #shorts
0:15
All New Atlas | Boston Dynamics
0:40
Boston Dynamics
Рет қаралды 5 МЛН
Samsung or iPhone
0:19
rishton_vines😇
Рет қаралды 1,1 МЛН