5 ms·
> Fancy type systems We are taking steps to this direction. By adding optional typing to dynamic languages Python and JavaScript/TypeScript. And then type chec
by sampo 3y ago
> Fancy type systems
We are taking steps to this direction. By adding optional typing to dynamic languages Python and JavaScript/TypeScript. And then type checker tools and local programming style guides are making using these maybe less optional, and more mandatory.
- t43562 3y agoIMO the day python types become mandatory there will be a fork. It would be such a total betrayal of it's reason for existing that we would have to invent another untyped or duck-typed language again.
- sampo 3y agoI mean, your company or your project may require you to write type hints and use a type checker tool. Not that Python the language makes typing mandatory.
- chasd00 3y agonagware like Typescript have turned type bolt-ons into a religion almost. It has its place but really gets in the way in others. Hence, the reason untyped languages exist in the first place.
- kfajdsl 3y agoFor me the primary purpose of TypeScript is to give my editor information about interfaces so I don’t have to do the menial back and forth of accidentally making a typo in a function name, object param, etc. I find myself using less type hints in Python because the story for REPL driven development is so much better than JavaScript, and that takes most of the pain away.
- datavirtue 3y agoGiving the editors hints in this case is very expensive.
- mock-possum 3y agoIt is, but it’s worth it in some situations. It’s so much easier to sit down to an unfamiliar codebase, or to participate in a team of more than three or four serious contributors, when typescript is there to guide you. I never would have guessed that that would be the benefit that won me over, but it absolutely has, all it took was a two year / six people project to completely sell me on typescript.
- morningsam 3y agoI find that even when type hints are made "mandatory" using Mypy's strict mode, having a dynamically typed language underneath that allows you to cheat using Any or cast() where necessary makes writing Python feel much less cumbersome than writing in actual statically typed languages. Presumably, a Python with "mandatory" type hints would still allow you to cheat in those same ways.
- slaymaker1907 3y agoSum types have definitely been making a big splash. I'd also look at how C++ has added concepts and Go has added generics. Local type inference is also commonplace too, even Java has it.
- peterfirefly 3y agoEven C23 has it.
- acchow 3y agoThose would be considered basic type systems. For "fancy", you gotta dive deeper into the lambda cube (tho generics I guess in 1999 would be fancy and one step in).
- Ar-Curunir 3y agoThe borrow-checker is pretty fancy.
- keybored 3y agoThe author thinks that Formal Methods are a Maybe because chipmakers while Fancy type systems are a No. I think the bar is pretty high for Type systems (in the mind of the author).