Keean Schupke
Keean Schupke
Yes, the second form is what I would want, although we need to decide on the keywords to use, and also whether to give the self type special status. For...
@shelby3 I have started a new topic to discuss function syntax, we should probably have other separate threads for class/data syntax and trait/impl syntax. Discussion of function syntax: https://github.com/keean/zenscript/issues/6
The way I have written these types is like this: ``` (Num | Add a a | Mul a a) as a ``` This is a recusive type, usable anywhere...
@shelby3 I have written a lot in both styles, my only objection to '' is that they are not really brackets and don't often get bracket matching in UI, and...
@shelby3 I can't see any evidence Swift can do multi-parameter type classes from following the link.
> So the workaround is only a local workaround. the only real solution is to define another function such as "reverse_less" in the total order type class and then you...
@skaller wrote: > The problem is that tying the algebra to the types is just wrong. Having written several large programs using both module and typeclass systems, I feel able...
> Afaics, you are not factoring in that the selection of the implementation of a typeclass is not solely determined on the data type being implemented for. As I pointed...
> Disagree. I can control which implementation gets dispatched for each type by choosing which implementations I import into the scope of the call site. Which is what I already...
@shelby3 instances need to be coherent to avoid non-local definitions changing local behaviour. If instances do not have global coherence then importing a module or runtime loading a DLL could...