News for hackers. Stuff that matters.
Re:How porting to TypeScript solved our API woes by smt88 on Wednesday April 08, 2020 @09:28PM (#22818995)
> annotate partial function application

I think you mean currying, right? It's been supported at close to the same level as Haskell for 3+ years[1].

> TS solves problems I don’t have

To me, it solves: 1) devs getting lazy on a team, 2) catching my mistakes before runtime, 3) correctly using library APIs, and 4) refactoring.

All of these might be low-value to you, though. I think #4 is the biggest time-saver because it enables automated refactoring (through the IDE) that isn't possible with plain JS.

> I don’t want thousands of global symbols in hundreds of files in my project.

I'm curious what you mean by this. Are you saying that TypeScript creates global symbols that weren't there before?

You can configure TypeScript so that it doesn't have any symbols from outside your project at all. For example, you can set it to import the types found in Node or on the web, or you can just skip them.

1. https://www.freecodecamp.org/news/typescript-curry-ramda-typ...

Re:How porting to TypeScript solved our API woes by Roboprog on Friday April 10, 2020 @06:08PM (#22837813)
Yes, implicit currying where supplying the final arg actually calls the underlying function is one kind of partial function application. Ramda is one thing I use.

I also use an in-house library to explicitly apply arguments to return a a new function, which allows you to produce 0 arity or variadic functions.

I’m glad somebody has a work around for using Ramda in TS, but it looks every bit as “fun” as generics in Java, which I think have wasted more of my time than they have ever saved.