I always thought it was setjmp. https://en.wikipedia.org/wiki/Setjmp.h
setjmp isn’t really that ugly, IMO.
The Ugliest C Feature: tgmath.h
11–20 of 24 posts
Re: The Ugliest C Feature: tgmath.h
#12The ternary operator is indeed special as it (is the only one AFAIK that) introduces in the language some type constraints between the two result branches, that affect the way one or the other is interpreted. A similar trick in C++ is explained on https://www.artima.com/cppsource/foreach2.html and allows to return the type of an expression without evaluating it . From the link: > You may be thinking this is needlessl…
Re: The Ugliest C Feature: tgmath.h
#13Re: The Ugliest C Feature: tgmath.h
#14Any sufficiently complicated C program contains an ad-hoc, informally-specified, bug-ridden, slow implementation of half of C++.
Re: The Ugliest C Feature: tgmath.h
#15(Ah no..., wrong thread. This is actually about C. /s)
Re: The Ugliest C Feature: tgmath.h
#16The ternary operator is indeed special as it (is the only one AFAIK that) introduces in the language some type constraints between the two result branches, that affect the way one or the other is interpreted. A similar trick in C++ is explained on https://www.artima.com/cppsource/foreach2.html and allows to return the type of an expression without evaluating it . From the link: > You may be thinking this is needlessl…
Qt apparently does something similar to implement Q_FOREACH: https://stackoverflow.com/a/10522384/5230900
https://code.woboq.org/qt5/qtbase/src/corelib/global/qglobal...
Re: The Ugliest C Feature: tgmath.h
#17With apologies to Philip Greenspun: Any sufficiently complicated C program contains an ad-hoc, informally-specified, bug-ridden, slow implementation of half of C++.
[1] https://www.amazon.com/Wenger-16999-Swiss-Knife-Giant/dp/B00....
Re: The Ugliest C Feature: tgmath.h
#18Re: The Ugliest C Feature: tgmath.h
#19With apologies to Philip Greenspun: Any sufficiently complicated C program contains an ad-hoc, informally-specified, bug-ridden, slow implementation of half of C++.
Re: The Ugliest C Feature: tgmath.h
#20With apologies to Philip Greenspun: Any sufficiently complicated C program contains an ad-hoc, informally-specified, bug-ridden, slow implementation of half of C++.
Sure, but the C++ STL is to code as this [1] is to knives. [1] https://www.amazon.com/Wenger-16999-Swiss-Knife-Giant/dp/B00... .
Is that the maximum you can charge on Amazon? Seems strange that they'd want to put a limit on it.