Skip to content

Rewrite

Adding new features (especially those with form fields, e.g. #2 (closed) with custom mappings) is rather difficult and very error prone. I believe it's time to rewrite this project, so it uses a statically typed language and some FE framework (if GUI is kept).

Options:

  1. React+Reason
  • pros
    • more type-safe compared to TypeScript
    • even React maintainers (Facebook) see this as a future
    • syntax is similar to JS (it was one of design goals of the language)
    • IDEA support
    • very fast iterating on code (quick compilation is a major goal of BuckleScript)
    • already some experience with the tech (from a smaller project with several screens, one moderately advanced form, a bunch of API calls, i18n everywhere)
  • cons
  1. Angular+TypeScript
  • pros
    • some experience with it from work (medium sized project, over year of development)
    • great IDEA support
  • cons
    • slower iterating on code (slow compiler)
    • a lot of libraries have bad and/or unsafe types
  1. Halogen+PureScript (probably not)
  • pros
    • more type-safe than TS and Reason
  • cons
    • I am not very acquainted with Halogen
    • no IDEA support (Atom support was not amazing, but alright)
    • I am not sure anybody from company would be able to contribute (PureScript is very unlike JS/TS, it's rather similar to Haskell, and Halogen uses quite complex types)

Another approach might be to entirely drop GUI and go with a small CLI tool (e.g. in "simple" Haskell, got quite a lot of experience in that area). It could be used from a terminal, e.g. with clipboard: clippaste | oa2iots | clipcopy. Or for better integration with IDE a tiny script for CopyQ could be created (get clipboard contents, run the CLI tool, paste result) for which can be assigned a hotkey. Or even IDEA plugin in Scala/Java (not sure it would be worth it, IDEA is a very large and complex project).

  1. CLI tool in Haskell
  • pros
    • a lot easier to implement (no GUI/front-end)
    • more type-safe than TS and Reason
    • more versatile - could be easily integrated with other tools/IDEs
    • quite good IDEA support
    • some experience with Haskell and already worked on similar projects
  • cons
    • not commonly known language (but it is taught on some universities, e.g. FIT), but I would say "simple Haskell" is on par with Reason in language complexity, and type system of "simple Haskell" (e.g. no lang. extensions allowing type-level programming) is less complex compared to TypeScript
Edited by monnef