News for hackers. Stuff that matters.
Re:TypeScript Seals My Penchant for JavaScript by seanwilson on Friday September 30, 2016 @05:46AM (#12611435)
Well you don't have much choice for frontend for one. Typescript offers much stronger typing than Ruby, Python, Clojure and PHP as well.
Re:TypeScript Seals My Penchant for JavaScript by winter_blue on Friday September 30, 2016 @05:54AM (#12611470)
If I were to start a new project today, I would use Elm[1] for the front-end. It's a very well-designed language (reminiscent of Haskell), specifically designed with HTML and DOM manipulation in mind.

[1] http://elm-lang.org/

Re:TypeScript Seals My Penchant for JavaScript by Wintamute on Friday September 30, 2016 @09:28AM (#12612280)
Surely by using Elm you may improve the quality of your program, but you restrict your staffing choices down to the <1% of frontenders who either know it already, or are capable of quickly picking up a Haskell-esque language.

Either that or you commit your client to huge up-front training costs.

Or how about the scenario that goes like: "The contractor who wrote our web app in Elm left last month, but we need some bug fixes or complex feature adding. Can someone fix it? Anybody? No?"

How do you sell that to a client?

Re:TypeScript Seals My Penchant for JavaScript by chriswwweb on Friday September 30, 2016 @06:08AM (#12611522)
Is using elm really worth it? I have not yet tried elm, but I wonder if it's advantages really justify the increased costs that this choice might bring? Isn't elm a little bit too young?

I mean is the time you and your coworkers will need to learn it, the increased difficulty to hire skilled elm developers, the increased difficulty to find good training courses for new junior developers you hire, the increased difficulty to debug the code compared to js, the lack of third party libraries ... really worth it?

Re:TypeScript Seals My Penchant for JavaScript by winter_blue on Friday September 30, 2016 @07:10AM (#12611733)
> the increased difficulty to debug the code compared to js

Elm has an amazing time-traveling debugging system: http://debug.elm-lang.org/ This is a cut above pretty much every other front-end JS framework, and languages that transpile to JS.

> the lack of third party libraries

It has JavaScript interop that's based around message-passing. The JS library is treated sort of like a service, and thus the Elm code is kept isolated from it: https://guide.elm-lang.org/interop/javascript.html

> the increased difficulty to find good training courses for new junior developers you hire

The official docs are pretty good. A good programmer shouldn't have a trouble picking it up. The architectural benefits of using Elm (that lead to a high-quality, almost zero bugs website) is IMO worth it.

Re:TypeScript Seals My Penchant for JavaScript by leshow on Friday September 30, 2016 @09:22AM (#12612257)
IMO actually decreases costs because of the amount of errors the type system catches and the ease of refactoring.

Elm also guarentees to NOT produce ANY runtime errors, that's quite a guarantee.

Re:TypeScript Seals My Penchant for JavaScript by seanwilson on Friday September 30, 2016 @06:44AM (#12611647)
Sounds interesting and I'd love to code in a real functional language instead of functional style in an imperative language. I haven't looked into Elm but isn't this going against the grain too much? TypeScript seems to be gaining traction such as with Angular 2. I mean I could code in OCaml with a transpiler to JavaScript if I wanted to but it probably isn't worth the friction.
Re:TypeScript Seals My Penchant for JavaScript by edem on Friday September 30, 2016 @10:20AM (#12612584)
Stronger typing than clojure? You gotta check out clojure.spec which is built into the language itself.
Re:TypeScript Seals My Penchant for JavaScript by seanwilson on Friday September 30, 2016 @10:35AM (#12612675)
Ah, I'm not that familiar with Clojure. Is that commonly used? Are there any good examples of complex properties you can capture with its type system?
Re:TypeScript Seals My Penchant for JavaScript by edem on Friday September 30, 2016 @01:27PM (#12613826)
See for yourself, Stuart Halloway (clojure committer) can explain it much better than me: https://www.youtube.com/watch?v=VNTQ-M_uSo8
Re:TypeScript Seals My Penchant for JavaScript by edem on Friday September 30, 2016 @10:21AM (#12612591)
You have actually. For example ClojureScript compiles to JS.
Re:TypeScript Seals My Penchant for JavaScript by pjmlp on Friday September 30, 2016 @10:15AM (#12612543)
For me frontend == native, so I have plenty of choices.