TypeScript.fun

@estejs

Typed Functional Programming in Typescript from and

Vrijeme pridruživanja: kolovoz 2012.

Tweetovi

Blokirali ste korisnika/cu @estejs

Jeste li sigurni da želite vidjeti te tweetove? Time nećete deblokirati korisnika/cu @estejs

  1. prije 20 sati

    Sooner or later you will realize it's all about functions composition, fp-ts (io-ts, monocle-ts) is well-typed toolset for that. Do not learn fp-ts. Just use pieces you understand. Option is the great start. So simple so efficient. That's almost all.

    Prikaži ovu nit
    Poništi
  2. prije 20 sati

    Read "Error handling with Either" as "I'm done with try/catch, it's so brittle and magic. I just want to return some error value. But how to handle it? Yay, Either!

    Prikaži ovu nit
    Poništi
  3. prije 20 sati

    Links: - Check examples, for example fold - Check examples, for example fold - And then, it's all about pipe, chain, map, fold, etc.

    Prikaži ovu nit
    Poništi
  4. prije 21 sat

    I am pretty sure that's almost all you need to know to be efficient with functional programming. You don't have to change how you write software entirely. Just learn basic piping with those type-classes/monads/whatever.

    Prikaži ovu nit
    Poništi
  5. prije 21 sat

    How to start with fp-ts? Learn: 1) Why Option is better than null/undefined pipe(getFoo(), O.fold(onNone, onSome)) 2) Error handling with Either pipe(doFoo(), E.fold(onError, onSuccess)) 3) Task/TaskEither (better Promise) 4) pipe, map, chain, sequenceT, sequenceS

    Prikaži ovu nit
    Poništi
  6. 1. velj

    Are you using fp-ts? Tell us why if you want. Thank you.

    Poništi
  7. 28. sij

    It looks like a task for typed functional programming. Without null/undefined/exceptions, it’s almost impossible to write code which unexpectedly fails. Why? Because type checker enforces all possible known errors have to be handled.

    Poništi
  8. 27. sij
    Poništi
  9. proslijedio/la je Tweet
    26. sij

    OOP versus functional programming I think it's all about contracts/seams among separate pieces of functionality your software consists of. We can have the perfect structure with classical OOP too! But it's very very hard to describe future abstractions now.

    Prikaži ovu nit
    Poništi
  10. 25. sij

    "Hello darkness, my old friend..." It's not typed, but highly functional ;-)

    Poništi
  11. 23. sij

    Very true. I even tried GraphQL for local data because of type safety. io-ts is much better.

    Poništi
  12. 22. sij

    Omg, is so good. And not only for typed styles.

    Poništi
  13. 22. sij
    Poništi
  14. 22. sij
    Poništi
  15. proslijedio/la je Tweet
    21. sij
    Odgovor korisniku/ci

    Honestly I just do this and it feels better. More explicit.

    Poništi
  16. proslijedio/la je Tweet
    22. sij

    Few handy built-in TypeScript types: 🔸 Partial - makes all props of the type parameter optional 🔸 Omit - omits the specified properties in the second type parameter from the first one 🔸 Parameters - gets the parameter types of a function

    Poništi
  17. 22. sij

    typescript-fun types/validators are tree-shakable

    Poništi
  18. 21. sij

    What do you prefer?

    Poništi
  19. 20. sij

    TaskEither is a promise which never throws, so we don't have to catch. On fail, it returns Either left.

    Prikaži ovu nit
    Poništi
  20. 20. sij

    A function signature should tell everything.

    Prikaži ovu nit
    Poništi

Čini se da učitavanje traje već neko vrijeme.

Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.

    Možda bi vam se svidjelo i ovo:

    ·