11,992 reputation
23780
bio website evincarofautumn.blogspot.com
location United States
age 24
visits member for 4 years, 6 months
seen yesterday

I like programming, language, and collecting hobbies.


Mar
23
comment Is higher-rank parametric polymorphism useful?
@GregRos: It’s also handy with existentials. In Haxl, we had an existential like data Fetch d = forall a. Fetch (d a) (MVar a), which is a pair of a request to a data source d and a slot in which to store the result. The result and slot must have matching types, but that type is hidden, so you can have a heterogeneous list of requests to the same data source. Now you can use higher-rank polymorphism to write a function that fetches all requests, given a function that fetches one: fetch :: (forall a. d a -> IO a) -> [Fetch d] -> IO ().
Mar
23
answered Is higher-rank parametric polymorphism useful?
Mar
7
answered Confusion regarding def function within Python
Feb
27
awarded  Disciplined
Feb
12
comment When would dynamic scoping be useful?
@JerryCoffin: Notable exceptions include Perl and Emacs Lisp—both used dynamic scoping originally, and now (Perl 5, Emacs 24) have support for both dynamic and lexical scoping. It’s nice to be able to choose.
Feb
5
comment What's the tradeoff for type inference?
It’s worthwhile to draw a distinction between type deduction (monodirectional, like C# var and C++ auto) and type inference (bidirectional, like Haskell let). In the former case, the type of a name may be inferred from its initialiser only—its uses must follow the type of the name. In the latter case, the type of a name may be inferred from its uses also—which is useful in that you can write simply [] for an empty sequence, regardless of the element type, or newEmptyMVar for a new null mutable reference, regardless of the referent type.
Feb
2
awarded  Popular Question
Jan
4
awarded  Guru
Jan
4
awarded  Enlightened
Jan
3
awarded  Good Answer
Jan
3
awarded  Nice Answer
Jan
3
answered Why might it be difficult to make a 64 bit version of a program?
Dec
24
awarded  Nice Answer
Dec
11
answered Why do objects created with no assignment not generate a syntax error in Python?
Nov
22
comment Why squash git commits for pull requests?
Strictly speaking, Git doesn’t allow you to change history. Commit objects are immutable. It’s only branch pointers that are mutable, and only then with a “forced update”, which is generally considered something you only do for development purposes, not on the master branch. You can always get back to a previous state using the reflog, unless git gc has been run to discard unreferenced objects.
Nov
17
accepted Values, types, kinds, and…?
Oct
3
answered Alternative to language purity
Sep
30
awarded  Explainer
Sep
17
answered Is there a name for the technique of converting method parameters into a unified form to simplify further processing?
Sep
15
awarded  Yearling