Reputation
14,815
Top tag
Next privilege 15,000 Rep.
Protect questions
Badges
3 44 86
Newest
 Enlightened
Impact
~359k people reached

Apr
29
comment Why isn't the overloading with return types allowed? (at least in usually used languages)
@gnasher729: I disagree. I regularly use Haskell, which has this feature, and I’ve never been bitten by its choice of overload (viz. typeclass instance). If something is ambiguous, it just forces me to add a type annotation. And I still chose to implement full type inference in my language because it’s incredibly useful. This answer was me playing devil’s advocate.
Apr
28
answered Why isn't the overloading with return types allowed? (at least in usually used languages)
Apr
27
comment Why do most mainstream languages not support “x < y < z” syntax for 3-way Boolean comparisons?
So, in short, it’s just a hard feature to design well.
Apr
18
answered Clairvoyance in caching - optimal strategies?
Apr
11
comment Determine execution order based on declarative definition?
Sounds like you’re looking for topological sorting.
Apr
5
comment Had operator precedence rules changed through the history of a computer language?
@EvilJS: Ah, I understand, I misread your wording as “C++ is backward-compatible with C”.
Apr
5
comment Had operator precedence rules changed through the history of a computer language?
@EvilJS: You claimed “C and C++ are backward compatible - there were no change of rules”, but there is one instance where operator precedence was changed.
Apr
5
comment Had operator precedence rules changed through the history of a computer language?
There is one minor difference: in C, the conditional operator has higher precedence than assignment: a ? b : c = d is (a ? b : c) = d (which is a syntax error because a ?:-expression is not an lvalue), while in C++ they have the same precedence and right associativity, so a ? b : c = d is a ? b : (c = d).
Mar
16
comment Why doesn't C have first class arrays?
I’d guess it’s just because you don’t want to inadvertently pass a large array by value.
Mar
9
answered Word to unambiguously represent data used at the input to a template?
Feb
15
comment Are there alternatives to types for static analysis?
@mheiber: A static type system is simply a static analysis that ascribes types (e.g., int, int -> int, forall a. a -> a) to terms (e.g., 0, (+ 1), \x -> x). Other analyses can ascribe different properties unrelated to data type, for example, side effects (pure, io), visibility (public, private), or state (open, closed). In practice, many of these properties can be checked in the same implementation as the type checking/inference, so the distinction isn’t totally clear-cut.
Feb
14
comment For Python programming and being Pythonic, why “never is often better than *right* now”?
There is a quote from Chuck Moore that I feel expresses this sentiment nicely: “Do not put code in your program that might be used. Do not leave hooks on which you can hang extensions. The things you might want to do are infinite; that means that each has 0 probability of realization. If you need an extension later, you can code it later—and probably do a better job than if you did it now. And if someone else adds the extension, will he notice the hooks you left? Will you document this aspect of your program?”
Feb
11
awarded  Enlightened
Feb
11
awarded  Nice Answer
Feb
11
answered Are there alternatives to types for static analysis?
Feb
2
awarded  Good Answer
Jan
25
awarded  Notable Question
Jan
22
awarded  Nice Answer
Jan
15
comment What does it mean to declare a volatile variable?
@EricLippert: If i is declared as volatile int i then pi must be declared as volatile int *pi, in which case *pi is a volatile access, no?
Dec
9
answered Getting a Candidate to do a Pull Request Review in an Interview