Reputation
347
Top tag
Next privilege 500 Rep.
Access review queues
Badges
1 11
Impact
~28k people reached

  • 0 posts edited
  • 0 helpful flags
  • 21 votes cast
Jul
23
comment What problem do algebraic data types solve?
No doubt you understand algebraic data types just fine, but your bulleted list ("A sum type is..." and "A product type is...") looks more like a description of union and intersection types, which aren't quite the same thing as sum and product types.
Apr
14
accepted What should be kept in mind when writing a garbage collector?
Apr
14
comment What should be kept in mind when writing a garbage collector?
@BasileStarynkevitch: As Doval said, I want a GC that doesn't assume much about the language I'm implementing. I know that some language implementations use a "uniform representation", where the size of everything is one word, and the first or last bit is used to determine whether the word is a pointer. This is acceptable to me. Also, I should've been explicit w.r.t. how much complexity I can accept: I want a compacting GC. If I didn't, as you said, a simple mark-and-sweep would be easy.
Apr
14
comment What should be kept in mind when writing a garbage collector?
Oh, I already know what a closure is. (A pair of an environment and a function pointer.) That is why I didn't ask that. And how to make a multi-threaded-friendly GC is (not yet) in scope. Right now I want the simplest thing that could possibly work.
Apr
14
comment What should be kept in mind when writing a garbage collector?
Care to explain the close vote? It seemed to me that this question was more appropriate here than in Stack Overflow, so I asked it here. :-|
Apr
14
asked What should be kept in mind when writing a garbage collector?
Nov
3
answered Is it good practice to catch a checked exception and throw a RuntimeException?
Sep
24
awarded  Autobiographer
Dec
16
comment Are there any implementations of deterministic regular expressions?
@delnan: OTOH, the NFA to DFA transformation is a lot harder, and this is why I write regular expressions whose NFAs are guaranteed to be DFAs without performing any transformation.
Dec
16
comment Are there any implementations of deterministic regular expressions?
@delnan: Those ε-transitions can be eliminated easily, giving a regular NFA. Wherever there is a transation A -ε-> B, consider every transition of the form B -x-> C and insert a transition A -x-> C. Also if B is an accepting state, then so must be A. Now you can remove A -ε-> B. Moreoever, the Thompson construction can be modified to insert the A -x-> C transitions directly, without inserting A -ε-> B in first place.
Dec
16
comment Are there any implementations of deterministic regular expressions?
@KilianFoth: If you come up with a better title, feel free to edit my question. :-)
Dec
16
comment Are there any implementations of deterministic regular expressions?
@KilianFoth: I edited my question to clarify what I mean by "determinstic regular expression". Also, I want an implementation that I can conveniently use in a conventional statically typed programming language, which grep is clearly not.
Dec
16
revised Are there any implementations of deterministic regular expressions?
added 85 characters in body
Dec
16
asked Are there any implementations of deterministic regular expressions?
Sep
8
comment Is functional programming a superset of object oriented?
Errr... C++11 lambdas are hardly first-class functions: Each lambda has its own ad-hoc type (for all practical purposes, an anonymous struct), incompatible with a native function pointer type. And std::function, to which both function pointers and lambdas can be assigned, is decidedly generic, not object-oriented. This is no surprise, because object-orientation's limited brand of polymorphism (subtype polymorphism) is strictly less powerful than parametric polymorphism (even Hindley-Milner, let alone full System F-omega).
Aug
23
comment Which one subsumes the other: class-based object-orientation or prototypal inheritance?
@BenjaminGruenbaum: Sorry, I meant to say that two languages being Turing-completeness is not enough to guarantee that one can replicate the operational semantics of the other.
Aug
23
comment Which one subsumes the other: class-based object-orientation or prototypal inheritance?
The operational semantics of C++ member functions and a struct full of function pointers are completely different.
Aug
23
comment Which one subsumes the other: class-based object-orientation or prototypal inheritance?
Syntactic issues aside (my use of object["member"] instead of object.member in the C++ implementation), why would 2 make no sense for static languages? (By the way object["member"] is also legal JavaScript.)
Aug
23
revised Which one subsumes the other: class-based object-orientation or prototypal inheritance?
deleted 391 characters in body
Aug
23
asked Which one subsumes the other: class-based object-orientation or prototypal inheritance?