20h
awarded Nice Question
2d
comment How to do OR gate and AND gate operation implementation by using JavaScript?
@pushpikaliyanaarachchi - see my edit - the onclick attribute is still wrong
Feb
11
answered How to do OR gate and AND gate operation implementation by using JavaScript?
Feb
10
comment How to reconstruct F# assembly signature from F# dll
Tomas - You're right that's what I was looking for ... but I got greedy. Thanks again
Feb
10
comment How to reconstruct F# assembly signature from F# dll
Where should I look/start if I want to load this model directly from a .fsi (assuming there are no other artifacts available)?
Feb
10
accepted How to reconstruct F# assembly signature from F# dll
Feb
10
comment How to reconstruct F# assembly signature from F# dll
I figured I just couldn't find it. Thanks for this and everything else - you've helped me out a lot.
Feb
10
revised How to reconstruct F# assembly signature from F# dll
added 176 characters in body
Feb
10
asked How to reconstruct F# assembly signature from F# dll
Feb
8
awarded Popular Question
Feb
2
awarded Yearling
Jan
28
awarded Good Question
Jan
13
awarded Nice Question
Jan
10
awarded Nice Answer
Dec
31
awarded Popular Question
Dec
18
comment Is is possible to pattern match on the underlying shape of a discriminated union?
@MarkSeemann I've been doing something similar with the catamorphism pattern. In terms of whether or not it's "cleaner" - it depends. From a pure data perspective it can be. The downsides are that: the boilerplate is more complicated/more overhead; and you lose expressiveness at the semantic level (a good example of this phenomenon). In the particular case I'm working on the complexity would hurt more than it would help. Good suggestion though - P.S. I learned a ton from your DI book
Dec
18
comment Is is possible to pattern match on the underlying shape of a discriminated union?
@MarkSeemann I thought of a simpler way to explain it. Consider: type Expr = | T | F | NOT of Expr | AND of Expr * Expr | OR of Expr * Expr. It manifests in 3 shapes from 5 symbols (2 constants, 1 function, 2 binary operations). Any evaluation procedure would use a distinct pattern for interpreting each node, based on if it were: a constant; a function; or, a binary operation. Depending on what you're doing with the expression you may be interested in whether an expression is AND/OR or you might only care that it's binary. In the 2nd case, matching on shape could easily save 100s of LOC
Dec
18
comment Is is possible to pattern match on the underlying shape of a discriminated union?
@MarkSeemann My purpose in identifying a common shape among distinct DU members is to deal with the shared attributes of their instances economically.
Dec
18
comment Is is possible to pattern match on the underlying shape of a discriminated union?
@MarkSeemann The members of a DU are mutually exclusive. This implies that no objects exist that are instances of more than one member of the DU. However, "two different cases have nothing in common" is too strong. You seem to be asserting that the definition of a disjoint union requires that instances of distinct members must not share common attributes. I'm pretty sure that would be wrong though. It actually seems likely that instances of distinct members of a DU would share attributes, for the same reason that they are declared in the same scope.
Dec
18
comment Is is possible to pattern match on the underlying shape of a discriminated union?
I see - but it looks like this approach would still require code that enumerates each case and assigns the shape (a Active Pattern per Discriminated Union). Or, were you suggesting that this could be generalized to something more reusable across distinct DU types?
1 2 3 4 5