John Skaller

Results 136 comments of John Skaller

To make progress I suggest implementing basic stuff, when in doubt leave it out until there are actual uses cases to consider. So, do not put "pure" yet. Do not...

What is wrong with type annotations? They’re great! They add to the ability to reason about code in principle. They allow error messages to make sense. The downside of annotation...

> As I said above, this has nothing to do with inference, you have to write the types in either case, but the main difference is that with FCP all...

Haha .. you're a spring chicken. I'm 61 :) Actually, Swift DOES have type classes. It doesn't call them that but it does have them. I don't know quite how...

Actually no, I'm referring to something simpler: Consider a TotalOrder type class. So Integer is totally ordered right? Which way? Up or down? You see? In Ocaml it is no...

FYI, AFAIK Haskell doesn't have type inference at all (it has kind inference though). In any case even if the instance bindings are local, you still have s problem if...

"Ah so overloading, but how do you select the desired instance within the context? Do you annotate somehow or is the proper overload inferred from context somehow?" You're hitting the...

Sorry I don't have it (Stepanov) and it isn't online so I can't read it (and I'm not rich enough to buy a book with examples in C++). But you...

OK, sorry. Here is a simple example, from the Felix library: ``` fun sort[T with Tord[T]](x:list[T])=> .... ``` That sorts a list. Now consider something that builds, say, a N-M...

I agree with your analysis: type classes are weaker but easier to use. The problem is simple, for a class X there is only one instance for T = A....