Reputation
10,894
Next privilege 15,000 Rep.
Protect questions
Badges
10 48 107
Newest
 Guru
Impact
~697k people reached

1d
comment Why isn't the overloading with return types allowed? (at least in usually used languages)
"along with requiring all functions to be pure and referentially transparent": How does this make return type overloading easier?
1d
comment Why isn't the overloading with return types allowed? (at least in usually used languages)
@JamesYoungman: For example to parse strings into different types, you can have a method int read(String s), float read(String s), and so on. Each overloaded variation of the method performs a parse for the appropriate type.
2d
comment Binary Search Tree without Natural Ordering
@JoulinRouge: You should add the such a relation must be reflexive, transitive, and antisymmetric. An arbitrary relation is not necessarily an order, take e.g. an equivalence relation (reflexive, symmetric, transitive). See e.g. en.wikipedia.org/wiki/Order_theory#Partially_ordered_sets
Apr
24
revised Does sql use hastables for indexes?
edited title
Apr
16
awarded  Guru
Apr
11
awarded  Good Question
Apr
7
comment How to stay DRY with return values
+1: For mentioning optional and the possibility to use a monad. optional should be used instead of exceptions if failure is expected and can occur often.
Apr
5
answered Lambda calculus: Call by value / Call by name (lazy)
Apr
5
revised What are the most common reasons for lack of forward compatibility
Fixed spelling
Apr
4
comment Why is XML called a “language” exactly?
@kevin: Exactly: any mathematical object for which there is a proper definition is well-defined, by definition. Normally, you do not say: let's consider a well-defined graph, with a well-defined node, etc. You only say well-defined if there is a chance to have an ill-defined one. So, since in the answer there is no mention of what could be an ill-defined subset of Σ*, I do not see why one should stress that the subset should be well-defined. If I speak of a set of strings, it is obvious that it should be a well-defined one.
Apr
4
comment Why is XML called a “language” exactly?
@5gon12eder: “The set containing all strings that are not contained in the set” is not a set. Any set is, by definition, well-defined. IMO the term well-defined is redundant here.
Apr
3
comment Why is XML called a “language” exactly?
What do you mean by well-defined subset? And why do you require that a subset of Σ* be well-defined in order for it to be a language? Wouldn't any subset be called a language?
Apr
3
comment If LYBL is faster than EAFP, why should I use try/except over hasattr?
@RobertHarvey: Isn't exiting a block with an exception a kind of flow control? Anyway, I did not want to start a debate about exceptions but I wanted to point out that different programmers have different opinions about them. The clarity argument definitely applies to the Python community, where exceptions are the preferred way to handle errors (it is easier to ask for forgiveness than permission).
Apr
3
comment If LYBL is faster than EAFP, why should I use try/except over hasattr?
@cat: Idiomatic constructs are not always the most efficient ones because their can require the implementation of an extra abstraction layer, which introduces execution overhead.
Apr
3
comment If LYBL is faster than EAFP, why should I use try/except over hasattr?
@RobertHarvey: As a side note: not all programmers find exceptions clearer, see e.g. joelonsoftware.com/items/2003/10/13.html. But, definitely, Python programmers consider code clarity a good motivation for preferring exceptions.
Mar
31
comment Find if certain files have been added or removed in large directory structure
I am quite sure there is a Qt mechanism that allows to register callbacks on files and directories so that a callback procedure is invoked whenever there is a change. Unfortunately I cannot find this in the documentation. I hope some Qt expert reads this question and posts an appropriate reference.
Mar
31
comment Find if certain files have been added or removed in large directory structure
Do you have the option to run additional processes on the machines to which the network drives are attached? Then each file server could run its own watchdog process and notify the other nodes when a local file is changed. For a local filesystem, there should be a mechanism in Qt that allows an application to listen on file or directory changes.
Mar
31
revised Using Clojure instead of Python for scalability (multi-core) reasons, good idea?
Removed reference to a page that does not exist any longer.
Mar
30
comment Should I add redundant code now just in case it may be needed in the future?
@whatsisname: Why not? I mean, whose responsibility it is to handle an error depends on how you design your application.. You might do it in the example function or in the main function, or somewhere else.
Mar
30
comment How can I make sense of the word “Functor” from a semantic standpoint?
"Alas, they didn't ask us, so we're stuck with names that mathematicians made up.": I do not understand why you find mappable more intuitive than functor. Functions are maps and functors are, well, some kind of function (between categories). I would even argue that mappable is misleading: any set is mappable onto another set while a functor does more than just mapping: it respects the underlying structures it is mapping.