Reputation
8,013
Top tag
Next privilege 10,000 Rep.
Access moderator tools
Badges
1 18 37
Impact
~242k people reached

Jul
28
comment Origin of “a method should return a value or have side-effects, but not both”
the comment and code do not match, BarWithSideEffects is not called if FooWithSideEffects returns false
Jul
27
comment Is there a Haskell idiom for trying several functions and stop as soon as one succeeds?
yep so you will need to do some sort of fold applying <|> at each stage which is I beleive what Thomas' answer does
Jul
27
comment Is there a Haskell idiom for trying several functions and stop as soon as one succeeds?
i.e. monoid for lists is the empty list and concat
Jul
27
comment Is there a Haskell idiom for trying several functions and stop as soon as one succeeds?
@JimmyHoffa it will depend on the typclass Maybe <|> will be different to List <|> no ?
Jul
22
comment How to show retry in sequence diagram
+1 it has always amused me that about the same time that software people were deciding graphical programming was the future, hardware people were deciding that graphical design didn't scale and they needed HDLs
Jul
15
awarded  Great Answer
Jul
13
comment Why are return values from compare functions in many languages defined loosely?
My suspicion is this is all ultimately inherited from C, hence prevalent in languages that have some C heritage but not in others. Considering C it makes the simple implementation arguments present below look right as overflow is UB in C anyway
Jul
13
comment Is there any programming language(s) which has mathematical number types?
one problem here is that FORTRAN REAL is not a Real number but floating point, so there is very little FORTRAN does here than any other programming language
Jul
10
comment Source code “prints” at release
@JanHudec you could argue that people that build release packs by hand don't understand software either ;)
Jun
16
comment Is the semantic contract of an interface (OOP) more informative than a function signature (FP)?
@9000 well most FP languages dont have typeclasses but yes there is some relation there
Jun
9
answered Find a line that is closest to scattered points
Jun
9
comment What is Banana split and fusion in functional programming?
is it worth mentioning that the bananas are (| |) brackets that the original paper uses to define cata
May
21
answered How do I show 'creates' in a UML class diagram?
May
19
comment Python: Are all dictionary comprehensions just more expressive and compact for loops?
might be worth pointing out that less expressive is potentially better IFF the things that cannot be expressed are error prone
May
18
comment What are functional-programming ways of implementing Conway's Game of Life
looks interesting - still waiting for that link though... ;)
May
7
comment What data structure would you use to represent an organic compound?
there are various systematic name systems that could also be used depending on what properties you actually want to model
Apr
17
comment What exactly makes the Haskell type system so revered (vs say, Java)?
+1 while this answer is not complete I think it is much better pitched at the level of the question
Apr
17
comment What exactly makes the Haskell type system so revered (vs say, Java)?
While ADTs and HKTs are definetly part of the answer I doubt anyone asking this question is going to know why they are useful, I suggest that both sections need to be expanded to explain this
Apr
11
revised Why does Java (and other langs too) have seemingly redundant functions like “str.startsWith(String str, int fromOffset)”?
added 1 character in body
Apr
11
comment Why does Java (and other langs too) have seemingly redundant functions like “str.startsWith(String str, int fromOffset)”?
@Philipp good call, added to answer