logoalt Hacker News

jasimtoday at 2:21 PM1 replyview on HN

I'm curious about the choice of Python, rather than TypeScript.

I find Ruby a very beautiful language, and Rails is an excellent web framework, but I need typed functions, record types and sum types.

They help not just with correctness, but also as living documentation that lets me understand AI generated code. TypeScript provides discriminated union, but not exhaustive pattern-matching, and its syntax is a bit verbose, but since I'm no longer writing most of the code myself, I can live with it.

However I can't imagine using Python or any other dynamic language going forward. There is likely good reason for you to choose it, and I'm curious to know what that is.


Replies

em-beetoday at 2:32 PM

python has optional types too now. if you could get the LLM to produce typed python would it be any worse than typescript?

show 2 replies