Reputation
2,174
Top tag
Next privilege 2,500 Rep.
Create tag synonyms
Badges
8 20
Newest
 Good Answer
Impact
~193k people reached

Dec
23
awarded  Good Answer
Dec
16
answered Why does the Lisp community prefer to accumulate all the parentheses at the end of the function?
Dec
16
comment Marriage of Lisp and LaTeX - has it been done?
By the way, LaTeX pays homage to Lisp by calling alternative versions of operators that do something slightly different with a * suffix. Lisp has let and let* and so on, LaTeX has \section and \section*.
Nov
25
revised Benefit of non-volatile access to volatile objects being undefined?
Remove stray text at bottom.
Sep
24
comment Benefit of non-volatile access to volatile objects being undefined?
What volatile does is quite clear. Objects which are volatile have to have values (at sequence points) which agree with the abstract semantics. Also, a footnote says that in an implementation in which objects, at sequence points, have the values which agree with the abstract semantics (i.e. a not very well optimized implementation), then volatile is redundant.
Sep
24
comment Benefit of non-volatile access to volatile objects being undefined?
Those aren't implementation-specific behaviors. The volatile uses with setjmp and signal handlers are required by ISO C. volatile defeats the optimizations which could cause a restored setjmp context to restore stale register-cached values of locals. It also defeats the optimizations that could cause accesses to a global sig_atomic_t variable to ignore updates by a signal handler.
Sep
24
comment Benefit of non-volatile access to volatile objects being undefined?
Programs which use memory-mapped hardware invoke undefined-behavior pretty much no matter how they gain access to it. I'm only interested in the portable C uses. volatile is required for C declared objects in two cases: objects that are modified since state is recorded with setjmp, but before the state is restored with longjmp, whose values are then used upon restoration. Secondly, asynchronous signal handlers may only modify volatile sig_atomic_t objects. I'm only interested in the portable C semantics.
Sep
24
awarded  Student
Sep
24
asked Benefit of non-volatile access to volatile objects being undefined?
Jun
23
revised In C++ why and how are virtual functions slower?
Mention shared libs.
May
21
comment Short circuit evaluation, is it bad practice?
No, the language isn't clever. The && operator is designed to work that way and must not evaluate the right hand side if the left is false. "Short circuiting" isn't an optimization; it is semantics. If it isn't done, programs break. Just like programs would break if if statements suddenly started evaluating else clauses even when the conditions are true.
Apr
1
awarded  Yearling
Jan
22
comment Why is 0 false?
Ruby is not an outlier. Ruby takes this from Lisp (Ruby is even secretly called "MatzLisp"). Lisp is a mainstream language in computer science. Zero is also just a true value in the POSIX shell, because it's a piece of text: if [ 0 ] ; then echo this executes ; fi. The false data value is an empty string, and a testable falsehood is a failed termination status of a command, which is represented by a non-zero.
Sep
24
awarded  Autobiographer
Sep
21
awarded  Nice Answer
Sep
12
awarded  Nice Answer
Sep
9
awarded  Necromancer
Aug
5
comment Is there any “real” reason multiple inheritance is hated?
Also, inheritance is a way of refactoring parts to a common class: namely the base class.
Jul
16
comment Is it a good idea to “#define me (*this)”?
@StevenBurnap Uh, if you call attributes me_ then you have the problem of me_foo = other_object.me_foo.
Jul
13
comment How to handle divide by zero in a language that doesn't support exceptions?
Failure is not an option because cron jobs run at night? But the operating system kernel underneath those cron jobs will panic if runs into a bug, day or night.