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

  • 0 posts edited
  • 0 helpful flags
  • 22 votes cast
Sep
10
accepted Methodology for exploring APIs in dynamic languages
Sep
5
comment Methodology for exploring APIs in dynamic languages
Nice answer. It's as if I had forgotten that APIs can be explained in English. :-) Just one "but": Is there any way of reading documentation that wouldn't require me to constantly switch between a text editor and a Web browser? With apropos or help() in a REPL running as an Emacs inferior process, I can visualize the documentation and my own code simultaneously, which reduces the mental effort of relating them to one another.
Sep
4
asked Methodology for exploring APIs in dynamic languages
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
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?
Aug
5
comment Generic and type safe I/O model in any language
@MattFenwick: What would your sum type look like, then?
Aug
1
comment I have to compromise: DRY, or Command-Query-Separation?
@StefanBilliet: By using the formal semantics of the programming language I am using to show that my program meets the formal specification I have given it. If some part is too critical to rely on myself alone for proving purposes, I write an obviously correct but possibly inefficient implementation in Coq, then I construct another more efficient implementation, and I prove as a theorem that the two implementations produce the same result.
Aug
1
comment I have to compromise: DRY, or Command-Query-Separation?
@StefanBilliet: My point is that testing itself is not a terribly useful activity.