gorgeous-ghost-95789
09/23/2020, 11:40 PMlively-beach-14291
09/23/2020, 11:40 PMX.add(Y)
or Y.add(X)
... but, that's just not right. So, in OO you have to hack it; or say, well "numbers aren't objects". Now, what about imaginary numbers? iX + iY
? Either you have to make Imaginary
and object, or you have to give up on +
.lively-beach-14291
09/23/2020, 11:43 PMgorgeous-ghost-95789
09/23/2020, 11:43 PMlively-beach-14291
09/23/2020, 11:43 PM+
, then, there are mulitiple implementations, (Int, Int), (Float, Float), (Int, Imaginary), etc.lively-beach-14291
09/23/2020, 11:44 PMScore
. Suppose x
is a Score
. Then you can do 3*x
and it'll call +(Int, Score)
.lively-beach-14291
09/23/2020, 11:45 PM+
and let any number of applications define their data types and what it means.gorgeous-ghost-95789
09/23/2020, 11:46 PMgorgeous-ghost-95789
09/23/2020, 11:46 PMlively-beach-14291
09/23/2020, 11:46 PMX
comes from one library, Object Y
comes from another. And the framework that defines render(canvas:SVG, row, col)
doesn't have to care what it means to create a triple product of canvas, row, and col are?lively-beach-14291
09/23/2020, 11:47 PMrender
without touching the framework code, etc. In this example, the application which wants to mix X
and Y
will have to define what -they- mean by render(canvas:SVG, x:X, y:Y)
lively-beach-14291
09/23/2020, 11:48 PMgorgeous-ghost-95789
09/23/2020, 11:49 PMlively-beach-14291
09/23/2020, 11:49 PMgorgeous-ghost-95789
09/23/2020, 11:50 PMgorgeous-ghost-95789
09/23/2020, 11:50 PMlively-beach-14291
09/23/2020, 11:51 PMgorgeous-ghost-95789
09/23/2020, 11:52 PMlively-beach-14291
09/23/2020, 11:53 PMgorgeous-ghost-95789
09/23/2020, 11:54 PMpowerful-plumber-39972
09/24/2020, 9:20 AMtall-dinner-62086
09/24/2020, 11:01 AMmysterious-toddler-20573
09/24/2020, 1:06 PMmysterious-toddler-20573
09/24/2020, 2:58 PMsrc:<selector>
in hx-trigger
so you could put an adjacent element and have it select the other trigger source:
html
<button id='btn1' hx-trigger='mouse-enter' hx-get=...>My Button</button>
<a hx-trigger='click src:#btn1' hx-post=...></a>
mysterious-toddler-20573
09/24/2020, 2:59 PMmysterious-toddler-20573
09/24/2020, 3:20 PMhtml
<button id='btn1' hx-trigger='mouse-enter' hx-get=...>
<meta property='htmx-ext' content='' hx-trigger='click' hx-post=.../>
My Button
</button>
and have a convention where if you have a meta tag with the property name htmx-ext
then we appy the hx attributes on that meta tag to the parent elementgorgeous-ghost-95789
09/24/2020, 3:25 PMsrc:
selector or something like it seems like a good way to go. Maybe even something like hx-src
or hx-listen
. It would be kind of like the inverse of the hx-trigger
attribute. It’s probably best to keep things as close to “vanilla” HTML as possible.gorgeous-ghost-95789
09/24/2020, 3:28 PMgorgeous-ghost-95789
09/24/2020, 3:29 PMmysterious-toddler-20573
09/24/2020, 4:07 PMsrc:
option is probably the most consistent