1,063 reputation
410
bio website
location
age
visits member for 3 years, 3 months
seen 9 hours ago

Sep
15
awarded  Good Answer
Sep
3
awarded  Yearling
Jun
15
comment What's the difference between recursion and corecursion?
@tathanhdinh Because omega is defined to be Succ(omega) so if Succ(y) = omega then Succ(y) = Succ(omega) and y = omega. The last step is admittedly a bit sketchy without fleshing out your foundations and formalizing the definition.
Jun
14
comment What's the difference between recursion and corecursion?
This is all a bit of lie since ocaml has value recursion I really should have used SML which is the only "mainstream"-ish language that supports inductive reasoning.
Jun
14
comment What's the difference between recursion and corecursion?
the goal is to show omega is not in nat. We do this by contradiction. If omega were in nat than the set N = nat - {omega} would satisfy the laws. That is because nat satisfies the laws. If y in N, 1. y is not omega and 2. y in nat. From 2 we know Succ(y) in nat, and by 1 y is not omega Succ(y) is not omega. Thus Succ(y) in N. N also includes zero. But, N is smaller than nat. This is a contradiction. Thus, nat does not include omega.
Dec
4
awarded  Nice Answer
Oct
3
awarded  Nice Answer
Sep
3
awarded  Yearling
Jun
5
awarded  Nice Answer
Feb
18
awarded  Caucus
Feb
5
comment Who first coined the term Higher Order Function and/or First Class Citizen?
"Higher order functions" exist in the work of Frege (functions taking functions as arguments for example), far predating Church's foundational work on the lambda calculus. A predicate in classical first oder logic is exactly a boolean valued function, so I second sclv's suggestion that this may be the source of the terminology.
Jan
4
awarded  Commentator
Jan
4
comment Why aren't user-defined operators more common?
In Haskell, parsing is "easy" (compared to most languages). Precedence is context independent. The part that gives you hard error messages is related to typeclass and advanced type system features, not to user defined operators. It is overloading, not user definition, that is the hard problem.
Dec
31
comment Why aren't user-defined operators more common?
every single one of these problems has been solved in languages that have existed for 20 years...
Dec
3
answered Why is there never any controversy regarding the switch statement?
Nov
25
revised Why is the concept of lazy evaluation useful?
deleted 5 characters in body
Nov
25
answered Why is the concept of lazy evaluation useful?
Sep
3
awarded  Yearling
Aug
27
comment Scheme vs Haskell for an Introduction to Functional Programming?
@alternative parsec has a Monadic interface, but it also has an Applicative interface, not to mention numerous other functions. It isn't that unreasonable to introduce Parsec before the monadic generalization
Aug
4
comment What backs up the claim that C++ can be faster than a JVM or CLR with JIT?
@gbjbaanb GC with finalizers is substantially different (and slower) than GC without at least on the JVM. Modern tracing GCs (without finalizers) tend to provide better performance than malloc and free most of the time since 1. memory is allocated by increasing a pointer (no data structure traversals) 2. less overhead from management strategies like reference counting 3. you only ever "free" giant blocks of memory. This is to say, you have to work hard to get the performance boost from C++ and even in the best of cases it mostly is from having less indirection.