#strongtyping β Public Fediverse posts
Live and recent posts from across the Fediverse tagged #strongtyping, aggregated by home.social.
-
I have a script called pyfix which runs mypy and ruff to
- have strong typing
- have a fixed and orderly import order
- have the file always formatted in the same way
- detect programming errors and redundancies.Now I am working on gitlogui (https://codeberg.org/harald/gitlogui) the main script of which I called glu. So I am running
pyfix glu
all the time, which reads funny. π
-
Grmbl.π©
Implementing an object graph with with loops.
After setup, it needs additional initialization.
The fields getting set will not change again. Ideally would be final (Java, or readonly in TypeScript). And I don't want an "if (bla!=null)" where ever access I them.
In my ideal solution this would be guarded by the type system where the nodes, once initialized, change type. I know roughly how it could be done, but its weird and cumbersome. π