4 ms·
If I may ask, have you found using a Typed language such as Typescript has changed your tendency to use Python for other tasks, given that it isn't typed? [0]
by vhanda 4y ago
If I may ask, have you found using a Typed language such as Typescript has changed your tendency to use Python for other tasks, given that it isn't typed? [0]
[0] - I understand that types can be added on top, but I never found the integration to work that well with mypy when I last tried it many years ago.
- erinnh 4y agoLots of stuff has changed for typed Python over the last few years. (starting with 3.7, but picking up with 3.8)
- seancolsen 4y agoYeah, interesting question! Our [team][0] is eight people who would probably give eight different answers. We've had some [debate][1] about whether or not to use types in Python, and eventually we settled on not using them. However we do use TypeScript. That makes our team a bit stratified across these different typing paradigms. This stratification seems to work okay though because each engineer's role is focused on either front-end work in TypeScript or back-end work in Python (without types). The front end people tend to like types, and the back end people tend not to. Personally, I love types! (Can you tell that I'm on the front end team??) I used mypy extensively at my last job and liked it okay, but mypy is just not as nice as TypeScript. It's come a long way, but it can still be pretty cumbersome. TypeScript on the other hand is fantastic. I'm certainly never going back to JavaScript. But to get back to your original question: yes, for me using TypeScript has changed my tendency to use Python for other tasks. I just don't want to use Python as much. For backend work, I'd reach either for TypeScript, or for Rust. But keep in mind I'm just a front end dev! :) [0]: https://mathesar.org/about.html https://mathesar.org/about.html [1]: https://github.com/centerofci/mathesar/discussions/913 https://github.com/centerofci/mathesar/discussions/913
- dmos62 4y agoI'm on Mathesar's backend team (hi Sean!) and I love types. It's actually a controversial topic amongst us (as might be gleaned from the discussion linked in above comment). I'd say we've come down to using a reduced set of Python features for the sake of community accessibility and maintainability. Maintainability argument being that types can be misused! I personally enjoy having the fanciest toolset, and I imagine that future community members will appreciate more interesting language features being used (because I expect them to be like me), but I also can't say that my personal viewpoint is more valid than the conservative approach we've chosen to adopt. That said, we've been focused on launch and, when that's done, language-related choices might yet be revisited! There's something to be said about balancing what's interesting and what's accessible. If anyone has stories to share, I'd love to hear it.
- noisy_boy 4y agoI work on back and front-end and universally like types. Compile time guarantees are a huge reliability booster.
- vladsanchez 4y agoI haven't because I'm Python biased. ;) However, for Web I've found myself leaning to TypeScript for type-safety and DX reasons. Have you ever tried [Pydantic](https://docs.pydantic.dev https://docs.pydantic.dev)!? It may be what you need for type safety / data validation.
- westurner 4y agoJSONLD types are specified with @type, and the range of a @type attribute includes rdfs:Class. icontract and pycontracts (Design-by-Contract programming) have runtime type and constraint checking; data validation. Preconditions, Command, Postconditions (assertions, assertions of invariance after command C_funcname executed) https://github.com/Parquery/icontract https://github.com/Parquery/icontract pydantic_schemaorg: https://github.com/lexiq-legal/pydantic_schemaorg https://github.com/lexiq-legal/pydantic_schemaorg > Pydantic_schemaorg contains all the models defined by schema.org. The pydantic classes are auto-generated from the schema.org model definitions that can be found on https://schema.org/version/latest/schemaorg-current-https.jsonld https://schema.org/version/latest/schemaorg-current-https.js... [ https://github.com/schemaorg/schemaorg/tree/main/data/releases/15.0 https://github.com/schemaorg/schemaorg/tree/main/data/releas... ]
- jamesfmilne 4y agoI started using type annotations heavily in my Python code recently, and coupled with IDEs like VSCode and PyCharm that leverage the typing, and the underlying tools like pyright/pylance, it's a game changer. I wouldn't try and write a decent-sized Python project without typing now.
- Waterluvian 4y agoTypescript has made me stop loving Python. I wish Python typing was powerful enough to be as complete as TS.
- revskill 4y agoVanilla JS is just fine.