These are chat archives for ThoughtWorksInc/Binding.scala

31st
May 2018
Leonid Turnaev
@glmars
May 31 2018 10:11
@Atry do you have any plans to migrate Binding.scala to Dsl.scala and Cats?
Do I understand correctly what it is possible? How hard is it in you opinion (may be PR can help)?
杨博 (Yang Bo)
@Atry
May 31 2018 10:12

It could be.

But I did not see enough benifits.

Lorenzo Gabriele
@lolgab
May 31 2018 10:14
There are ways to get the value of an input (like the inputId.value thing ) for dynamic elements (like a Seq of inputs) ? (The id is not fixed at compile time)
If it is a interesting question I can post it on StackOverflow.
Leonid Turnaev
@glmars
May 31 2018 10:49
@Atry, to have the single FP library (cats) in projects which uses Binding.scala
杨博 (Yang Bo)
@Atry
May 31 2018 10:50
@lolgab Go ahead
@glmars Binding.scala uses Scalaz because Each requires scalaz.Monad.
However, Dsl.scala does not depend on Cats nor Scalaz.
Binding.scala does not have to depend on Cats if we replace Each to Dsl.scala
Leonid Turnaev
@glmars
May 31 2018 11:01
So, there is an additional benefit: reduced scalajs output size (Scalaz isn't so small in JS)! In case if some project still doesn't use any FP library.
杨博 (Yang Bo)
@Atry
May 31 2018 11:05

(Scalaz isn't so small in JS)

The entire Scalaz is big. Fortunately a typical web application with Binding.scala only uses a very small part of Scalaz. You can open your xxxx-fastopt.js to check it. DCE in Scala.js is very useful.

Leonid Turnaev
@glmars
May 31 2018 11:13

DCE in Scala.js is very useful

I agree, DSE is cool. But on some project I had 2640/2400 kb result of fullOptJS with/without Scalaz.

I suppose that the influence of Scalaz in Binding.scala can be not so much.
(my test project have not used Binding.scala)