logoalt Hacker News

quotemstr12/09/20242 repliesview on HN

Amazing how hard some people try to avoid the obviously correct and portable "#pragma once".


Replies

uecker12/09/2024

It is neither portable nor obviously correct.

show 1 reply
cozzyd12/09/2024

for me it's mostly muscle memory that takes a few seconds at the beginning of a file.

i#ifndef __foo_h <escape>yyp:s/ifndef/define/<enter>o<enter>#endif<escape>