572 reputation
28
bio website
location Cologne, Germany
age
visits member for 3 years, 5 months
seen yesterday

Functional programming enthusiast, audio engineer & musician. Whilst not busy with any of that, I study physics at Universität zu Köln / Bonn-Cologne Graduate School.


Oct
27
comment What can Haskell's type system do that Java's can't and vice versa?
I wouldn't call ADTs a feature of the type system. You can fully (if awkwardly) emulate them with OO wrappers.
Oct
22
comment Why are floating point numbers used often in Science/Engineering?
That quote being from here. A good read and plenty to discuss about, but not here since indeed it has nothing to do with your post or this question.
Oct
4
comment Is there an optimal number of lines of code per function?
Nᴏʙᴏᴅʏ expects the Spanish... ah bugger, I'm a bit late here.
Sep
28
comment Why is type inference useful?
Well, technically, the information is always redundant when it's possible to omit manual signatures: otherwise the compiler wouldn't be able to infer them! But I get what you mean: when you just duplicate a signature to multiple spots in a single view, it's really redundant to the brain, while a few well-placed type give information you'd have to search a long while, possibly with a good many nonobvious transformations.
Sep
28
comment Why do most programming languages have special keyword or syntax for declaring functions?
"Mathematicians don't prefer f = nn + 1 over f (n) = n + 1" ... Not to mention physicists, who like to write only f = n + 1 ...
Sep
28
comment Why do most programming languages have special keyword or syntax for declaring functions?
re Hoki: "why we have while and for loops" – I disagree with that one. The reason most languages need loops etc. as built-in syntax is that they aren't flexible enough to define this kind of thing within the language (at least not efficiently). In Common Lisp, loops and decision functions are macros like you could also define yourself. In Haskell, which properly keeps track of side-effects etc. rather then having a fuzzy notion of "execution environment" and mutable state, loops are simply library functions!
Sep
24
awarded  Autobiographer
Sep
2
comment Beginning a sentence with a function name?
While adding a visual clue is certainly a good idea (the best being a dedicated font or otherwise highlight), I agree with kapep that appending empty parens is a really problematic choice, because in every language I know f() means something different from f. Why not surround the name with some suitable character, e.g. markdown-style `fread` (that's what I tend to do in VCS commit messages)? Or simply (fread). Of course, any such thing should be done consistently, not just for functions at the beginning of a sentence.
Aug
20
comment Does functional programming ignore the benefits gained from the “On the Criteria To Be Used in Decomposing Systems into Modules” (data hiding)?
In other words: in functional programming, much more is "hidden" by default, simply because it doesn't even exist! Only stuff you explicitly bring into scope is "unhidden".
Jul
25
comment Does this kind of programming language exist?
@Phil: I meant, as polymorphic as conceivably possible in the static type system. (Which actually isn't even true; Haskell with RankNTypes has "infinite polymorphicism" so it defaults just to the most general Rank-1 type.) Sure there are some things you can only do with actual dynamic types. Whether enough of these are actually a good idea to make the whole thing worth while is another question. If all programs ever written were in fact good, fine, but usually there will be bugs, and a H-M type system absolutely excels at catching these before ever running the code.
Jul
17
comment Does this kind of programming language exist?
Consider if a static Hindler-Milner type system might not a better fit for what you wish than dynamic types. H-M languages feel in some ways almost as "dynamic" as Python because pretty much all the types are inferred automatically by the compiler, and by default everything is as polymorphic as conceivably possible. Yet you're guaranteed this will happen at compile time – with an optimising compiler for a dynamic language you can only hope this. They have never become mainstream, but O'Caml and Haskell are very mature. And metaprogramming is quite possible, though not as popular as in Lisp.
Jul
8
answered Why do some functional programming languages use a space for function application?
Jul
7
comment How does the “Fourth Dimension” work with arrays?
@Scott: I agree the notion of "dimension of an array" is unfortunate because it means something unrelated to the dimensionality of a space whose vectors you might represent by the arrays. (However I also think it's not such a good idea to represent vectors by plain, unabstracted arrays in the first place.) A better name might be the rank of an array, in analogy to tensors.
Jul
4
comment How does the “Fourth Dimension” work with arrays?
"we assume each spatial dimension to be infinite" infinite isn't the biggest deal here actually, continuous is the "real" problem (i.e. over-countably infinite, and we need a homeomorphic mapping so it's physically meaningful).
Jul
4
awarded  Nice Answer
Jul
3
awarded  Yearling
Jul
3
answered How does the “Fourth Dimension” work with arrays?
May
12
comment Does C++ compiler remove/optimize useless parentheses?
I wonder why a) you consider the parenthesised expression more readable (to me it just looks ugly, misleading (why do they emphasize this particular order? Shouldn't it be assiciative here?) and clunky) b) why you'd think without parentheses it might perform better (clearly parsing parens is easier for a machine than having to reason about operator fixities. As Marc van Leuwen says though, this totally has no influence on runtime).
May
2
comment If null is bad, why do modern languages implement it?
@RualStorge: no matter what you call it you'll need to handle it – to some degree, sure. But if you make it explicit it becomes way more obvious how to correctly handle it. And indeed easier if the language is powerful enough, since option types form a monad, so it can basically be as simple as just changing the signatures to mention there's a lack-of-value possibility; the handling itself is taken care for by the compiler (with the help of some mighty mathematical proofs).
Apr
4
comment Does functional programming add complexity in code?
@user949300: but apart from ca and cb they're all introduced no more than two lines above from where they're used. The problems with short names arise mainly when there's potential for confusion, and tight scoping prevents that. And because these short names contribute to conciseness, you can more often keep the scopes so small. (Sometimes it's even better to avoid introducing local variables completely by using point-free style.)