345 reputation
1310
bio website bugsquash.blogspot.com
location Buenos Aires, Argentina
age
visits member for 4 years, 1 month
seen Nov 21 at 9:15

yet another developer, mostly .net, mostly web


Nov
20
comment What and how much domain code should be put in an F# module
@guillaume31 we are both making claims, just opposite. If you can't remember where a function is, you'd have to search for it across the whole project anyway... you can start searching by module name for example.
Nov
20
comment What and how much domain code should be put in an F# module
@guillaume31 Do you have a link to research to back up the opposite? :) I just say it from my own experience. If you keep your code as pure as possible you usually don't need to scan an entire file to understand the code. You can focus on particular functions as the scope is smaller, and then you navigate to other functions as needed.
Nov
19
comment What and how much domain code should be put in an F# module
"Low cognitive load to explore a file" has absolutely no relation to the number of lines of code in a file. If you find it hard to read it's probably because you're intertwining pure code with side effects. About DDD first see stackoverflow.com/a/2181281/21239
Nov
19
comment In what way are union types better for correctness than a common interface?
ADTs are closed types, that's the real difference. You can do closed types in C# too, see bugsquash.blogspot.com/2012/01/…
Jul
8
comment Why no developer API in C++ for Google or Yahoo mail?
@PeteKirkham Cool, however that doesn't invalidate my point in any way, i.e. I could easily mention 5 more languages where this is not available. Also the Haskell binding you mention was created in 2013, while my answer was written in 2010. And the Erlang code you mention seems to be plain SMTP, I don't see anything about OAuth in there so it's not about the Google API.
Mar
28
comment Why aren't user-defined operators more common?
Also, the argument "Every new developer was destined to be confused by this terminology. Do we not have enough problems learning a new domain?" could have been applied to OOP back in the 80s, structured programming before that, or IoC 10 years ago. It's time to stop using this fallacious argument.
Mar
28
comment Why aren't user-defined operators more common?
The comparison with functional programming doesn't hold. Custom operators are about syntax. Functional programming is a different way (compared to the mainstream OO/imperative) of thinking things.
Nov
18
comment Is there a way to created nested computation expressions?
Instead of focusing on syntax, focus on composability first. Then write syntax on top of that, if needed. And even if it's not possible to have the syntax exactly the way you wanted, composability is far more important.
Nov
18
comment Is there a way to created nested computation expressions?
gist.github.com/mausch/7534443
Oct
21
comment Why C# is not statically typed but F# and Haskell are?
@jozefg I invite you to analyze my gist again. You'll see that the type is closed and the only catamorphism exposed (the Match method) ensures total case handling, statically. You may not like the syntax (which is a subjective argument), but the core properties are there.
Oct
21
comment Why C# is not statically typed but F# and Haskell are?
@JimmyHoffa This is not like that argument at all. For comparison, try to encode type constructor abstraction in C# in an interoperable way. Again, I quote straight from the answer: "We can model this with an inheritance hierarchy, but these are open." -> this is false and it's what I'm criticising, I'm not arguing if it's a language feature or not.
Oct
21
comment Why C# is not statically typed but F# and Haskell are?
What does line count have to do with anything? You say "Anyone can come along and add something to it.", I'm showing how that's not true. I'm not proving your point, I'm proving you wrong. "Ugly", "impractical" aren't objective arguments. I use this encoding every day in my C# day job and find it very useful and "practical". Also, 142 lines includes the entire example. Definitions are 80 LoC including functor and applicative functor operations.
Oct
21
comment Why C# is not statically typed but F# and Haskell are?
It's actually very easy to encode a closed sum type in C#... here's an example. gist.github.com/mausch/6774627 . Also the subtyping part that others have already mentioned.
Mar
7
comment Why doesn't Python allow multi-line lambdas?
stackoverflow.com/questions/1233448/…
Feb
12
comment Can't I just use all static methods?
@DonalFellows : C#, VB.NET, F#, Javascript, Scala are some examples.
Oct
28
comment Java vs. C# - Productivity perspective
Since you mentioned Scala and Clojure you might as well mention F# too...
Oct
15
comment What can Haskell's type system do that Java's can't and vice versa?
Higher-rank ( haskell.org/haskellwiki/Rank-N_types ) /= higher-kinds ( haskell.org/haskellwiki/Kind )
Sep
29
comment When do you use a class instead of a record when you do not want to use mutable fields?
FWIW you can emulate typeclasses in F# : code.google.com/p/fsharp-typeclasses
Aug
16
comment How do existential types differ from interfaces?
blog.functorial.com/posts/2010-12-04-Existential-Types.html
Aug
7
comment How do you encode Algebraic Data Types in a C#- or Java-like language?
@Euphoric C# has become a quite usable functional language with C# 3.0. First-class functions, built-in common functional operations, monads.