Reputation
9,395
Top tag
Next privilege 10,000 Rep.
Access moderator tools
Badges
9 41 91
Impact
~432k people reached

21h
comment Cleanest way to write logically procedural software in an OO language
"Recently I've been working on a number of smaller programs (in C#) whose functionality is logically "procedural". For example, one of them is a program which collects information from different databases, uses that information to generate a sort of summary page, prints it, and then exits.": Are you sure you are not confusing "procedural" with "imperative"? Both procedural and object-oriented are (can be) imperative, i.e. they can express operations to be performed in a sequence.
21h
comment Polyglot Node.js with Typesafe Akka for Actor Model
What specific kind of JSON manipulation are you missing on the JVM?
Jul
1
comment Is message-oriented middleware applicable for intra-application communication?
I do not know what message oriented middleware is but the way you describe it it reminds me of the actor model.
Jun
30
awarded  Popular Question
Jun
26
awarded  Yearling
Jun
24
reviewed Leave Open How can I make an object/class inaccessible to Reflection
Jun
21
awarded  Popular Question
Jun
17
comment Is it possible to bootstrap MIT scheme from portable C to native?
I agree that this question is better suited for stackoverflow. Also, you could try the mit-scheme mailing list.
Jun
17
comment Why would a program use a closure?
@JörgWMittag Yet, to build an object you have to combine multiple closures, whereas to build a closure you take a special, simple object (with one method only). Intuitively it seems to me that closures carry less information than objects.
Jun
17
comment Why would a program use a closure?
@JörgWMittag: So, if I am not mistaken, objects can be seen as an idiom built on top of the simpler / more primitive concept of a closure.
Jun
17
comment Why would a program use a closure?
"The purpose of closures is simply to preserve state; hence the name closure - it closes over state.": It depends on the language, really. Closures close over external names / variables. These may denote state (memory locations that can be changed) but the may also denote values (immutable). Closures in Haskell do not preserve state: they preserve information that was known at the moment and in the context in which the closure was created.
Jun
17
comment Why would a program use a closure?
@JörgWMittag: Like you can see cloures as objects with only one method, you can see objects as collection of closures that close over the same variables: the member variables of an object are just the local variables of the object's constructor, and the object's methods are closures defined inside the scope of the constructor and made available to be called later. The constructor function returns a higher-order function (the object) that can dispatch on each closure according to the method name that is used for invocation.
Jun
15
comment Object Oriented Programming Concepts and Interviews
There is little agreement as to what object-oriented means: community.schemewiki.org/?object-oriented-programming
Jun
15
comment What is a closure?
@RoboAlex: Where a closure and its captured data is stored depends on the implementation. In C++ it can be stored in the heap or on the stack.
Jun
15
comment Should I check parameter before using it in methods?
@Elko: As w3d explained, if an error condition is expected, then it makes sense to check for it. An exception, as the name suggests, should be used for something that is not expected. My favourite example: item not found in the db -> return false or another value indicating no result; cannot connect to the db -> throw exception.
Jun
10
comment Recursion, iteration, and …?
After all, also for and while loops are nothing else but iterated functions in disguise.
Jun
10
comment Recursion, iteration, and …?
Maybe iterated function? en.wikipedia.org/wiki/Iterated_function
Jun
8
comment What is Banana split and fusion in functional programming?
@jozefg: Thanks for the link to your post. One question about it. In the sentence "An algebra in this sense is a pair of an object C, and a map F C → C.", is C really supposed to be an object, or rather a category? In other words, I am not sure if F denotes a functor in a category, and the F-algebras are the algebras induced by that functor, of if F is a particular arrow from an object onto itself.
Jun
8
awarded  Notable Question
Jun
7
comment Why isn't lazy evaluation used everywhere?
@JonasElfström: Please, do not confuse mutable state with one of its possible implementations. Mutable state can be implemented using an infinite, lazy stream of values. Then you do not have the problem of mutable variables.