BlueRaja - Danny Pflughoeft

less info
2,931 reputation
1322
bio website blueraja.com/blog
location
age
visits member for 3 years, 2 months
seen Mar 30 at 11:11

Jan
20
awarded  Yearling
Dec
30
answered Implementation of algorithm to generate chess positions
Dec
30
comment Implementation of algorithm to generate chess positions
Each bishop attacks up to 14 different squares, so this is actually about 444k positions to search (15862*28). We can do significantly better than that - see my answer.
Dec
22
awarded  Good Answer
Dec
22
awarded  Announcer
Nov
21
comment Why do most programming languages only support returning a single value from a function?
@David I'm not sure what you mean by the "current convention," all calling conventions use the stack. thiscall (the calling convention used by C++) uses one register for the this pointer, and the rarely-used fastcall stores the first two arguments in registers. Everything is is on the stack. See also
Nov
21
comment Why do most programming languages only support returning a single value from a function?
@David no, cdecl allows for (theoretically) unlimited number of parameters (that is why varargs functions are possible). Though some C-compilers may limit you to several dozen or hundred arguments per function, which I think is still more than reasonable -_-
Nov
14
comment Is there any “real” reason multiple inheritance is hated?
"a well done system of trait style composition would be really powerful/useful..." - These are known as mixins, and they are powerful/useful. Mixins can be implemented using MI, but Multiple Inheritance is not required for mixins. Some languages support mixins inherently, without MI.
Oct
30
comment Why can't Java/C# implement RAII?
duplicate of Did the developers of Java consciously abandon RAII?, though the accepted answer is completely incorrect. The short answer is that Java uses reference (heap) semantics rather than value (stack) semantics, so deterministic finalization is not very useful/possible. C# does have value-semantics (struct), but they are typically avoided except in very special cases. See also.
Oct
29
comment Is linq more efficient than it appears on the surface?
See also Why are Where and Select outperforming just Select?
Oct
26
awarded  Guru
Oct
25
comment What are the safety benefits of a type system?
@BenjaminGruenbaum: ...What!? It is obviously not undecidable in statically-typed languages, or else writing a compiler for those languages would be impossible.
Oct
25
comment What are the safety benefits of a type system?
@BenjaminGruenbaum: A "clever linter" can only detect type errors before runtime in the most trivial of cases. In general, the problem is undecidable in non-statically-typed languages like Javascript.
Oct
21
awarded  Good Answer
Oct
18
awarded  Nice Answer
Oct
18
revised Is it acceptable to upload offensive content to GitHub?
deleted 2 characters in body
Oct
18
answered Is it acceptable to upload offensive content to GitHub?
Oct
9
awarded  Nice Answer
Sep
26
comment Developer failing developer interviews
I bet his attitude of being "better than" interview questions is coming out during the interview. I would equate that attitude to someone who doesn't believe their code can be improved; I think that's even more telling than whether he actually solved the problems.
Aug
28
comment What are CPU registers?
See also