Paul Louth chris rollings This is not sufficient, because it works only with interfaces, where type classes/instances are simulated by the library. With real HKTs we want (and have) type checking also for data types, even if there are no type classes instances involved, like this:
twitch.tv/Limmy Loved both films, but you can’t beat Turbo dancing on the ceiling from 2
youtu.be/PZ93GNHBHsE?fe…
borar (Rob Ashton) Mark Rendle 🇺🇦 Explain to me why the ergonomics are horrible. If you put the same implementation of an IO monad in C# (with language-ext) and Haskell side-by-side (other than C#'s syntactic bulk) it's essentially the same.
Having an opinion is fine, passing it off as fact isn't.
borar (Rob Ashton) Mark Rendle 🇺🇦 5/ The one limitation to this approach is that it's not ad-hoc, unlike Haskell, it requires the IO<A> type to derive from K<IO, A> - that's a limitation which requires writing wrapper types to apply ad-hoc trait implementaions (like PureScript).
(Rob Ashton) Mark Rendle 🇺🇦 You might need to update your position. Static interface methods allows for traits that enable higher-kinds (transformers, monads, applicatives, etc). True it’s not quite as powerful as Haskell/PureScript, but it’s not far off.
paullouth.com/higher-kinds-i…
Paul Louth Super cool hack, really; but an encoding does not imply it is usable. More importantly
> Don't we deserve higher-kinds? Aren't we allowed to follow the pure functional programming paradigm?
Higher kinds does not give you pure functions
queue.acm.org/detail.cfm?id=…
If you are using
Paul Louth Can one program with such a library in C#? Of course, no denying that. The second part of the discussion was specifically about the ergonomics, not about the possibility.
Paul Louth As for your proof, here is a simple counter-example. In C# the following instantiation of type variables is legal: K<String, Int>. In Haskell 'String Int' fails to type check (exactly because there is simply no notion of kinds in C#). So they cannot be equal.
Paul Louth (Rob Ashton) Mark Rendle 🇺🇦 Meanwhile, C# dev managers are debating whether it's ok to use linq.
Paul Louth (Rob Ashton) Mark Rendle 🇺🇦 I just took a look at the library repository. It is impressive and is the result of big effort, no doubt. But I can't bring myself to thinking that it is comparable to Haskell or PureScript in any way other than the concepts in general.
Paul Louth So allow me to ask once again: can we claim then, that C# supports HKTs just like Haskell?
borar Paul Louth (Rob Ashton) Mark Rendle 🇺🇦 $0.02 - Paul Louth is on another level and you should sample what he's cooking, borar
you need to check out language-ext if you haven't yet - it's very, very good
Paul Louth You make quite strong claims about a supposed *proof* of equality of two constructs, I point out an obvious difference. Then you conveniently call my argument 'academic'. 'Proof' is an academic word that normally carries serious meaning and intention.
Erik Meijer Paul Louth Here is wizard code I've wrote some time ago:
from _ in Start(Welcome)
from c in GetCredentials()
from crt in GetCert(c)
select SetupSignProcess(crt)
Without LINQ it was a mess of nested while-s that can break when user clicks Back and move to next while when Next.
Mistake🤣
Paul Louth borar (Rob Ashton) Mark Rendle 🇺🇦 In Haskell code I see classification: MIO is a functor, and here is how, MIO is an applicative and here is how.
'addM' reads simple: 'given that M is a monad, follows ...'
C# code looks like dancing around and can only be comprehended by translating it into Haskell mentally.