Hacker News new | past | comments | ask | show | jobs | submit login

Tangential, is there a book to learn typing? I feel I need a hefty book to learn typing. Don't mind if you recommend a Typescript book or other language with similar concepts.



You mean types, right? Typing is what you do on a keyboard.

If you want to understand type systems, Types and Programming Languages (https://www.cis.upenn.edu/~bcpierce/tapl/) is the book most people start with. If that is too advanced for you, PLAI (https://www.plai.org/) is a gentle introduction to programming language theory which includes type systems.


Those books are great; though I'm not sure whether they are good for a beginner? Getting your feet wet by programming in a few reasonably typed languages might be better, before you tackle TAPL?

(By 'reasonably typed' I mean something like Haskell, OCaml, even TypeScript or Facebook's hack. But not Go, C++ or Java.)


If you want something JavaScript-ish with strong type inference, take a look at ReScript (https://rescript-lang.org/)



I can recommend Total Typescript by Matt Pocock, a course and a collection of tutorials. He is writing a book in public at [0] as well.

A bit more advanced, and geared towards library authors, is Type-level Typescript.[1]

[0]: https://github.com/total-typescript/total-typescript-book

[1]: https://type-level-typescript.com/


Not a book, but this might help:

"Python Type Challenges" (https://github.com/laike9m/Python-Type-Challenges) — Master Python typing (type hints) with interactive online exercises


https://www.cis.upenn.edu/~bcpierce/tapl/

This is a comprehensive resource that I use as a reference. Happy reading!


This is an odd question to read. The first programming language I learned* was C and types were so fundamental that you HAD to learn them if you were going to do anything at all.

So now I wonder, do people really spend so much time in weakly typed languages that types seems to be a special concept? Or is there something about types that has gotten so complex that its worthy of extra study?

*I did do some BASIC as a middle schooler but it didn't stick. C did.


That is a big topic. Learning typing in Go will be easier than Typescript which is orders more sophisticated. In Typescript you can solve Sudoku in the type system! Then there is the theory of type systems. But if it is the day to day just use it, it will make sense. You are just describing what the type of something will be in code rather than let it be figured out at runtime.


Programming with types by Vlad Riscutia fits your bill exactly.

Examples in typescript (so syntax should be familiar compared to e.g OCaml) and teaches you how to model a domain in types and how to think in terms of a type system, instead of diving into the details of how to implement one.


Haskell might be a fun if indirect way to learn more about a type system. It’s a neat middle between academic typing systems and a language you can do real stuff with.

Typescript might be nice because of how it’s a gradual typing system, just try and do a bit more and more with it as you go.



I learned it through Domain Modeling Made Functional (it uses F# though which looks the same as Ocaml).




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: