2,168 reputation
11321
bio website
location Houston, TX
age 31
visits member for 3 years, 8 months
seen Sep 15 at 13:28

Aug
31
answered “Ever change the value of 4?” - how did this come into Hayes-Thomas quiz?
Aug
16
comment Why are packed structures not part of the C language?
It would be possible to make unaligned access work on systems that don't support it in hardware by implementing such structs as an array of bytes and performing the necessary bit-shifting and &/| operations to read/write the values of each field.
Jul
18
comment Why does C dominate in the embedded software market?
@JohnR.Strohm: The problem is that Pascal's type checking was too strong. For example, arrays of different sizes are completely different and incompatible types.
Jul
17
answered Why shouldn't an object reference have access to a static member in C#
Jul
9
awarded  Nice Answer
Jul
8
answered Pointer indexing
Jul
8
comment Pointer indexing
Related SO question: stackoverflow.com/questions/10473573/…
May
29
answered “bug” in C++11 text by Stroustrup?
May
7
awarded  Good Answer
Feb
11
comment What rationale is used when programming language designers decide what sign the result of modulo operation takes?
The first example was a typo: I meant (a + b * c) % b == a % b, i.e., the % operator is divisor-periodic in the dividend, which is often important. For example, with floored division, day_count % 7 gives you the day of the week, but with truncating division, this breaks for dates before the epoch.
Feb
10
comment What rationale is used when programming language designers decide what sign the result of modulo operation takes?
But truncating division has its own inconsistencies as well: It breaks (a+b*c)/b == a % b and a >> n == a / 2 ** n, for which floored division has sane behavior.
Jan
7
awarded  Yearling
Dec
11
awarded  Necromancer
Dec
6
comment Do sigils make source code easier to read?
@SeanMcSomething: The more fundamental reason that the Bourne shell had sigils was that it also decided to make quotation marks optional. program $filename means a totally different thing from program filename.
Dec
6
comment Will loop constructs become obsolete?
@MarjanVenema: In Python, you could write for (a, b) in zip(arrayA, arrayB):.
Nov
16
comment Interpreter or virtual machine that does not execute bytecode
Not quite true. Atari BASIC, for example, internally stored statements in binary "tokenized" form. (I think GW-BASIC did too.)
Nov
16
comment How to handle divide by zero in a language that doesn't support exceptions?
@RossPatterson: Dijkstra actually did live long enough to see PHP. I don't know if he ever made any comments about the language.
Oct
30
comment Why can't Java/C# implement RAII?
Sort-of duplicate of programmers.stackexchange.com/questions/118295/…
Jul
4
comment Why do most programming languages only support returning a single value from a function?
@tdammers: Pascal does distinguish between procedure and function, but the latter can still be non-pure.
Jul
3
comment Why do most programming languages only support returning a single value from a function?
Most programming languages allow functions like rand() or time() which aren't functions in the mathematical sense.