Reputation
5,840
Next privilege 10,000 Rep.
Access moderator tools
Badges
3 19 51
Newest
 Announcer
Impact
~115k people reached

May
18
comment Are functional languages better at recursion?
Your imperative code could be collapsed to x == 0 ? 1 : x * factorial(x - 1).
May
18
reviewed Approve Are functional languages better at recursion?
May
18
revised Are functional languages better at recursion?
Emphasizing pattern matching.
May
18
comment Are functional languages better at recursion?
@marcof My point is that all the talk about recursion vs iteration doesn't address the sleekness of your code sample. It's really about pattern matching vs conditionals. Perhaps I should have put that up top in my answer.
May
18
answered Are functional languages better at recursion?
May
17
comment What sorting algorithm does STL use?
I hope you aren't using <vector.h>! Standard C++ moved to <vector> back in the late '90s. All of the standard headers now omit the .h that standard C uses. (In contrast, Boost uses .hpp, which is what a lot of new C++ code uses outside the standard library.)
May
15
comment Abstract Data Type and Data Structure
You first might want to read What is the difference between an Array and a Stack?
May
15
awarded  Nice Answer
May
10
awarded  Civic Duty
May
7
awarded  Famous Question
May
6
awarded  Notable Question
May
6
awarded  Good Question
May
6
awarded  Publicist
May
6
awarded  Booster
May
6
awarded  Popular Question
May
6
awarded  Announcer
May
6
awarded  Quorum
May
4
answered Why would I write a DSL instead of a form based RIA?
May
4
answered Corporate Framework: good or bad?
Apr
30
reviewed Approve Merits of a “Message Passing” system vs. an “Event Based” system