What about having that at param level?
(and how would it compose? - think several hooks)
The secret to the monadic stuff is that because the outer type is always preserved, you never lose access to any scope (it‘s always the same), and you can always refactor (because it’s always the same).
From what I can tell, higher types are nice because they allow you to build little implicit machines that operate behind the scenes with types of known functionality, and all you have to do is implement how a particular function works in a given case and it gets done automatically when that case comes up.
For example, "hello" + "world"
and ['hello'].concat(['world'])
are kind of the same function, and normally you would have to write a function to handle each type.
With higher types you can have a type that unifies those ideas, called a SemiGroup
and then a function append (a1:A, a2:A):A;
which allows you to write more general functions relying SemiGroup
as an idea, but implemented differently based on the specific type.
You can't specify this sort of construct without higher types, it snarfs up the type system (technical term)
any help?
Laurence
--
To post to this group haxe...@googlegroups.com
http://groups.google.com/group/haxelang?hl=en
---
You received this message because you are subscribed to the Google Groups "Haxe" group.
For more options, visit https://groups.google.com/groups/opt_out.
--
--
--
To post to this group haxe...@googlegroups.com
http://groups.google.com/group/haxelang?hl=en
---
You received this message because you are subscribed to the Google Groups "Haxe" group.
For more options, visit https://groups.google.com/groups/opt_out.
Is there a way to avoid using the underscore to specify the macro lookup method? e.g. new MyClassX(1).eq._([etc...]);
For some reason, that looks really strange to me. I'd rather have a small named method that's giving a clue as to what's going on.
However, it's only a minor gripe, I really like the implementation overall.
However, it's only a minor gripe, I really like the implementation overall.