Showing posts from April, 2020

org.scalablytyped, coursier and polyglot projects

org.scalablytyped, coursier and polyglot projects With a variety of scala compilation targets these days, there is a growing appreciation that CLI tools are an important part of the toolbelt allowing you to integrate scala into polyglot project–projects with more than one programming language. For example, scalablytyped recently introduced an experimental CLI and a new feature to compile typescript types in the same project. For some projects I have in mind, this is an important feature. Here’s a real server project: nodejs app server, say using apollo server for graphql typescript, because there are some parts you may have already coded in typescript, such as data access objects and server startup scala.js, so you can leverage scala and scala based programming approaches You need interop. If your data access objects are written in typescript but need to use them in scala.js, you will have to write interfaces. Writing interfaces is error prone and time cons

here's why I like scala.js

here's why I like scala.js Here’s why I like scala.js. I write various types of frontends for some of my the AI/machine learning/bigdata/data wrangling/* work. Typescript is the dominant language for writing frontends although vanilla javascript is still huge. Typescript continues to make great strides in its typing system and adapting to the javascript way of doing things. Unfortunately, it will probably never be quite right as many typings still resolve to any and hence, I lose the benefits of typing fairly quickly. Also, to reduce errors in my code, I like to use functional concepts e.g. effects as values. I also like immutable data. There are immutable libraries available of course, but that’s yet another js-alien addition. Effects in typescript are an evolving story. If I want to curry a function, that’s another library. Ouch! Awhile ago, I wrote a reactjs facade, scalajs-reaction , that I continue to use in production work. It uses the spirit of Reas