Reputation
2,895
Top tag
Next privilege 3,000 Rep.
Cast close & reopen votes
Badges
13 30
Newest
 Yearling
Impact
~137k people reached

1d
comment What's the difference between simulation and emulation
I'd say you got the two concepts mixed up. It's simulation that doesn't care about the exact implementation; emulation cares very much about the internals. See: M.A.M.E.
1d
comment Swift Optional types
recommended reading: Optional Chaining
1d
comment I am new to programming. I just google lessons and learn. I need an advice as where do I start?
Upvoters: really? By upvoting, you're effectively telling this new user "keep asking questions like this".
1d
comment I am new to programming. I just google lessons and learn. I need an advice as where do I start?
Career & education advice, as well as advice about offsite resources is off-topic here. What you can ask here are questions about specific problems you have.
Jun
23
reviewed Approve Does REST is only limited to optimistic concurrency control?
Jun
17
comment Why would a program use a closure?
@supercat I'm probably missing something, but it seems pretty inconvenient and fragile to design shareable objects that way. I'd say it's about as inconvenient as designing shareable closures.
Jun
16
comment Why would a program use a closure?
@supercat Wouldn't the same disadvantage exist with stateful objects?
Jun
12
comment Why pointer symbol and multiplication sign are same in C/C++?
@iammilind A possible compromise would be to close the other question but copy the answer quoting Ken Thompson here (you could post it yourself and accept it)
Jun
12
comment Why pointer symbol and multiplication sign are same in C/C++?
@iammilind Don't take it the wrong way! This isn't something negative about your question. Also, relative age of both questions isn't relevant. I think the accepted answer here is less accurate than one of the answers in the other question (which comes "straight from the horse's mouth").
Jun
10
comment Why would we need to rollback twice before closing in a finally block?
@RobertHarvey I think the OP is asking about the two consecutive rollbacks in the finally block. They seem like a cut-and-pase mistake to me...
Jun
8
comment Why isn't lazy evaluation used everywhere?
Such as? There are reports of significant performance costs when using eager evaluation as well (costs in the form of either unneeded evaluation, as well as program non-termination). There are costs to almost any other (mis)used feature, come to think of it. Modularity itself may come at a cost; the issue is whether it's worth it.
Jun
7
comment Why isn't lazy evaluation used everywhere?
This seems to be an answer out of inexperience with languages with lazy evaluation. For example, what about infinite data structures?
Jun
7
comment Why isn't lazy evaluation used everywhere?
You seem to be arguing out of inexperience. I suggest you read the paper "Why Functional Programming Matters" by Wadler. It devotes a major section explaining the why of lazy evaluation (hint: it has little to do with performance, early optimization or "loading infrequently accessed data", and everything to do with modularity).
Jun
4
comment What can go wrong if the Liskov substitution principle is violated?
@user949300 A matter of good OO design is mostly orthogonal to having "a good compiler or static analyzer" -- good OO design must work in most situations and for most OO languages. For example, if you do OOP with an interpreted language, how is the "compiler" going to help you then? And a "minimal test suite" is demonstrably not enough (give me your suite and I'll write code that breaks it); even a reasonable test suite won't catch many bugs.
Jun
4
comment What can go wrong if the Liskov substitution principle is violated?
@user949300 I cannot give you an example of convoluted production code and don't have the time to distill it to its essentials. But Jimmy Hoffa's last comment hit the mark: it's not enough for software to "work", the costs of maintaining and refactoring it have to be taking into account. Otherwise, what's the point of having generics in Java, if collections of Objects work just as well?
Jun
4
comment What can go wrong if the Liskov substitution principle is violated?
@user949300 Well, your comment was unsupported as well. I wasn't trying to provide an answer; I'm quite satisfied with the accepted one.
Jun
3
comment What can go wrong if the Liskov substitution principle is violated?
@user949300 The Java Collections is a terrible counterexample, because they are known to have multiple historical problems. You can work around them, but it'd be better if they weren't there. Remember, at one time Java Collections didn't even support generics, and people still managed to write useful programs without them. Does this make generics useless, or "fairly academic"? :)
Jun
3
comment What can go wrong if the Liskov substitution principle is violated?
@user949300 This is not "fairly academic". If subclassing breaks existing methods which accept the superclass, this introduces a maintenance nightmare. You cannot introduce unit test to cover for every deviation a subclass can make, and you cannot predict them. Like this answer states, this problem can be seen as a case of tight coupling, which is a very serious and real-world software engineering concern!
Jun
3
comment What can go wrong if the Liskov substitution principle is violated?
@user949300 No, it doesn't. Also, minimal unit testing is not enough for non-toy situations.
Jun
2
comment What stops C from being compiled/interpreted/JIT'ed?
I'm puzzled about this bit: "what stops C from being compiled/[...]". Uh, nothing?