You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
HOTScript functions shines when someone want to do composition like this :
But it's a new pattern way of creating things. Because your HOTScript functions are not evaluated at instanciation that's why you need to encapsulate their use in a Eval or Apply, CallN or Pipe Utility type.
I propose we write some guidelines for :
how to create you own custom utility types by just using HOTScript composition (like the one in the screenshot where you don't need to use the interface pattern because HOTScript already has all the building blocks you want to create your own)
How to create low level HOTScript Functions (using the interface pattern)
When creating Low Level HOTScript functions, you usually don't want to use Higher level ones to create it. Because you don't need the overhead of PartialApplication etc.
So maybe also expose the internal utility types to help users create their own without them needing to ask for their narrow use case utility to be integrated in HOTScript because we don't expose utility types.
So we should maybe expose two types of modules :
import{Numbers}from'hotscript';// HOTScript functionsimport{Numbers}from'hotscript/utilities';// Normal Typescript Utility Types
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
HOTScript functions shines when someone want to do composition like this :
But it's a new pattern way of creating things. Because your HOTScript functions are not evaluated at instanciation that's why you need to encapsulate their use in a
Eval
orApply
,CallN
orPipe
Utility type.I propose we write some guidelines for :
When creating Low Level HOTScript functions, you usually don't want to use Higher level ones to create it. Because you don't need the overhead of PartialApplication etc.
So maybe also expose the internal utility types to help users create their own without them needing to ask for their narrow use case utility to be integrated in HOTScript because we don't expose utility types.
So we should maybe expose two types of modules :
Beta Was this translation helpful? Give feedback.
All reactions