News for hackers. Stuff that matters.
Re:The perils of transition to 64-bit time_t by 38 on Saturday September 28, 2024 @09:26PM (#41684105)
your comment has the tone of this being an elegant solution, but it reads to me like an awful hack. typeless macros are a nightmare I never want to deal with again.
Re:The perils of transition to 64-bit time_t by eschaton on Saturday September 28, 2024 @10:10PM (#41684319)
These are very straightforward and do in fact serve as an elegant solution.
Re:The perils of transition to 64-bit time_t by smackeyacky on Saturday September 28, 2024 @10:45PM (#41684461)
Elegant maybe in the 1980s before compilers got properly complicated. Now they’re a weird anachronism.

I’m old enough to have worked on c++ when it was a precompiler called cfront and let me tell you trying to work out whether your macro was doing something weird or the cfront processor did something weird was very frustrating. I swore off macros after that.

Re:The perils of transition to 64-bit time_t by eschaton on Saturday September 28, 2024 @11:19PM (#41684613)
This is a case where you’re seeing the word “macro” and reacting to that when it’s really not warranted. It’s not using macros for complicated code generation, just selecting from a couple alternatives based on one or two possible compiler arguments.

I’m also old enough to remember CFront and this isn’t that.

Re:The perils of transition to 64-bit time_t by ykonstant on Sunday September 29, 2024 @11:00AM (#41687854)
I am not an expert in these things, but the discussion here reminds me of https://news.ycombinator.com/item?id=41182917
Re:The perils of transition to 64-bit time_t by eschaton on Monday September 30, 2024 @01:02AM (#41693711)
And yet it shouldn’t because it’s not and doesn’t need to be anywhere near that degree of complexity.

This is exactly the sort of thing I mean when I said the previous respondent was reacting to the use of the term ‘macro’ rather than their actual complexity.