Reputation
9,053
Next privilege 10,000 Rep.
Access moderator tools
Badges
2 33 44
Newest
 Yearling
Impact
~104k people reached

Jan
22
awarded  Yearling
Jan
11
awarded  Good Answer
Nov
13
awarded  Good Answer
Aug
18
comment Mutable AST vs. different immutable ASTs
Well I'm off the opinion that each AST for each different intermediate language ought to be different types, so for each "non-optimization" pass you'll have to output a new one anyways so those may as well be immutable. For optimizations, I could see an argument in either direction depending on the language: it's generally simpler to construct a new AST (you don't have to worry about losing information you need) but not all languages take kindly to so much allocation.
Jul
13
reviewed Approve What are some good books to use to learn ADA?
Jul
12
comment Banning zero-argument functions — what problems could it cause in a hypothetical language?
This is what you would do in [s, Oca]ml to declare a function taking no interesting parameters. unit -> foo is a common type when declaring "This has some side-effects and computes a foo"
Jul
8
answered how do interpreters differ for statically- or dynamically-typed languages?
Jun
19
awarded  Enlightened
Jun
8
comment What is Banana split and fusion in functional programming?
C is an object in some category (let's say CC), F is a functor from CC -> CC so it maps CC back onto itself. Now F CC -> CC is just a normal arrow in the category CC. So an F algebra is an object C : CC and an arrow F C -> C in CC
May
8
comment Functional programming and Text adventures
I think Chris Marten's research would be interesting, it aims to show how to make interactive fiction in declarative languages nice. github.com/chrisamaphone/interactive-lp
May
1
answered Haskell types for functions
Apr
7
comment difference between generics and interfaces
This seems related
Mar
22
answered Is higher-rank parametric polymorphism useful?
Mar
21
comment Is it possible to “bake dimension into a type” in haskell?
@BenjaminHodgson You can't do dependent types with templates because you cannot simulate a pi type. The "canonical" dependent type must would claim you need is Pi (x : A). B which is a function from A to B x where x is the argument of the function. Here the return type of the function dependents upon the expression supplied as an argument. However, all of this can be erased, it's compile time only
Mar
17
awarded  Enlightened
Mar
17
awarded  Nice Answer
Mar
16
revised Why C# is not statically typed but F# and Haskell are?
added 32 characters in body
Mar
16
awarded  Nice Answer
Mar
16
answered What is the reason of using an interface versus a generically constrained type
Mar
13
comment Missing `$` like operators in Haskell
@BenjaminHodgson GHC can't assume that you actually obey the type class's laws though. Somewhere, some (probably mean) person has a codebase relying on a broken functor :/