Earlier quoted context omitted.
The advantage you mention is one of many (over OOP interfaces), I'll repeat it as (A). (A) Ability to instantiate old types with new classes (B) Conditional instantiation: "Maybe a" is an instance of "Show" iff "a" is an instance of "Show" (C) Can do return-type polymorphism, or polymorphism on any part of the signature (D) Objects do not need to pay for the interface vtable pointer. Large array of some type-class in…
(C) is covered by generics in most cases. The others, yes.
Haskell tutorial for C programmers
51–56 of 56 posts
Re: Haskell tutorial for C programmers
#52Re: Haskell tutorial for C programmers
#53Re: Haskell tutorial for C programmers
#54Earlier quoted context omitted.
The advantage you mention is one of many (over OOP interfaces), I'll repeat it as (A). (A) Ability to instantiate old types with new classes (B) Conditional instantiation: "Maybe a" is an instance of "Show" iff "a" is an instance of "Show" (C) Can do return-type polymorphism, or polymorphism on any part of the signature (D) Objects do not need to pay for the interface vtable pointer. Large array of some type-class in…
E) you do get a dilemma if you add two elements in a sorted structure , lexically in two different files, where two different Ord instances arr in scope, respectively. this function-is-instance problem is dual to OO's -object-is-instance problem.
One type -> at most one instance for any class, in Haskell.
Re: Haskell tutorial for C programmers
#55Earlier quoted context omitted.
Groundhog is pretty awesome[1]. Persistent also works, but it does some wonky stuff on SQL databases. Acid-state is really neat! Of course, there's stuff like postgresql-simple, but that's not very type safe. [1] https://www.fpcomplete.com/school/to-infinity-and-beyond/pic... Edit: Also, esqueleto has a pretty okay looking hackage page[2], but I've never used esqueleto, so I don't really know. [2] http://hackage.hask…
Do you have any experience with Database Supported Haskell (DSH) [1]? I've just recently found it and it seems very nice. I didn't have the time to test it though. [1] https://hackage.haskell.org/package/DSH
Re: Haskell tutorial for C programmers
#56@kissthblade: Your comment (dead) below is very sad. You've been hell-banned for more than a year and a half. It doesn't just seem like nobody is seeing your comments, it's true. For those without showdead on: "I posted about the same comment as the parent hours ago. I don't know if anybody even sees my posts, never gotten a response, and my "karma" or something has always been 15. And posting and reading the forum i…
I'm trying to grasp how moderation and banning works around here, but it's difficult since neither the FAQ nor the posting guidelines have an explanation about it.