54,109 reputation
12101227
bio website
location
age 38
visits member for 3 years, 6 months
seen 1 hour ago

I've written software for everything from network equipment to Apache helicopters. Although I mostly program in C++ now, it was actually my seventh language I used professionally, so I like to think I can still think outside the C++ box.


1h
revised Is there a point in using closures for non-fully functional programming languages?
explain research on delegates
8h
awarded  c#
14h
comment Is there a point in using closures for non-fully functional programming languages?
Actually, it's delegates that solve the naming conflict problem. I had to do some research on .NET. I was not aware of delegates, as everyone else either does full-blown closures or nothing. Given that context, I'm deleting my answer.
15h
comment Is there a point in using closures for non-fully functional programming languages?
Those are all interfaces, @Robert. You still would have the issue of needing to avoid name conflicts if you need to implement multiple handlers. How would you know what to name your handler functions?
15h
answered Is there a point in using closures for non-fully functional programming languages?
19h
comment C# - Typical instantiation of new object - is there a way to avoid repetitious syntax?
Actually, x <= 100 && NotPrime(x) won't skip primes, it will exit the entire loop when it hits the first prime number. Something like @Konrad's Where(NotPrime) is much easier to get right.
22h
revised C# - Typical instantiation of new object - is there a way to avoid repetitious syntax?
Reworded slightly to not sound like a polling question
22h
answered C# - Typical instantiation of new object - is there a way to avoid repetitious syntax?
1d
awarded  Nice Answer
2d
comment How another popular language would avoid having to use factory pattern while managing similar complexity as in Java/JEE?
I think if Scala were to overtake Java, it will be because people prefer the "Scala way" of architecting software. What strikes me as more likely is Java continuing to adopt more of the features that drive people to switch to Scala, like Java 5's generics and Java 8's lambdas and streams, which hopefully will eventually result in programmers abandoning anti-patterns that sprung up when those features weren't available. There will always be FactoryFactory adherents, no matter how good languages get. Obviously some people like those architectures, or they wouldn't be so common.
2d
answered How another popular language would avoid having to use factory pattern while managing similar complexity as in Java/JEE?
Apr
14
answered Parameterless & Empty-Paren methods in Scala
Apr
13
comment Multithreading synchronization interview question: Find n words given m threads
This is just showing the loop for each thread. The setup code would have to post to the first semaphore to kick things off.
Apr
13
comment Multithreading synchronization interview question: Find n words given m threads
It's just an array of standard semaphores. Nothing special about them. Notify is called "post" in some implementations.
Apr
11
awarded  Cleanup
Apr
11
revised Why should passwords be encrypted if they are being stored in a secure database?
rolled back to a previous revision
Apr
9
awarded  Popular Question
Apr
9
answered What is “the refactoring method” for understanding code wrote by someone else?
Apr
7
answered Are closures considered impure functional style?
Apr
7
answered What are the perks and drawbacks of using html templates versus building the html in-code