Reputation
2,574
Top tag
Next privilege 3,000 Rep.
Cast close & reopen votes
Badges
1 15 23
Newest
 Nice Answer
Impact
~212k people reached

  • 0 posts edited
  • 1 helpful flag
  • 2,930 votes cast
Jul
28
awarded  Nice Answer
Jun
26
answered Has variable width types been replaced by fixed types in modern C?
Jun
25
comment Has variable width types been replaced by fixed types in modern C?
Related: stackoverflow.com/questions/24444356/…
Jun
19
comment What stops C from being compiled/interpreted/JIT'ed?
It's possible to emulate 32-bit arithmetic on a 36-bit machine ANDing the result of every operation with 0xFFFFFFFF to truncate it to 32-bits. So, these machines could implement Java, it would just be slower than if Java allowed nonet-based types.
May
18
awarded  Nice Answer
Jan
21
awarded  Good Answer
Jan
7
awarded  Yearling
Dec
12
comment Why are there so many spaces and line breaks in Unicode?
xkcd.com/927
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