#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. 😀
-
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. 😀
-
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. 😀
-
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. 😀
-
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. 😀
-
Nice one. Type hints in Python allow to list a number of literal values, similar to TypeScript union types and the syntax is actually somewhat more explicit.
To implement page up/down in https://codeberg.org/harald/gitlogui I have now:
def doPage(self, factor: Literal[-1] | Literal[1]) -> None:
step = factor * int(self.pageSize.get())
...and I can be sure, when using mypy, that doPage is only ever called with either -1 or 1.
-
Nice one. Type hints in Python allow to list a number of literal values, similar to TypeScript union types and the syntax is actually somewhat more explicit.
To implement page up/down in https://codeberg.org/harald/gitlogui I have now:
def doPage(self, factor: Literal[-1] | Literal[1]) -> None:
step = factor * int(self.pageSize.get())
...and I can be sure, when using mypy, that doPage is only ever called with either -1 or 1.
-
Nice one. Type hints in Python allow to list a number of literal values, similar to TypeScript union types and the syntax is actually somewhat more explicit.
To implement page up/down in https://codeberg.org/harald/gitlogui I have now:
def doPage(self, factor: Literal[-1] | Literal[1]) -> None:
step = factor * int(self.pageSize.get())
...and I can be sure, when using mypy, that doPage is only ever called with either -1 or 1.
-
Nice one. Type hints in Python allow to list a number of literal values, similar to TypeScript union types and the syntax is actually somewhat more explicit.
To implement page up/down in https://codeberg.org/harald/gitlogui I have now:
def doPage(self, factor: Literal[-1] | Literal[1]) -> None:
step = factor * int(self.pageSize.get())
...and I can be sure, when using mypy, that doPage is only ever called with either -1 or 1.
-
Nice one. Type hints in Python allow to list a number of literal values, similar to TypeScript union types and the syntax is actually somewhat more explicit.
To implement page up/down in https://codeberg.org/harald/gitlogui I have now:
def doPage(self, factor: Literal[-1] | Literal[1]) -> None:
step = factor * int(self.pageSize.get())
...and I can be sure, when using mypy, that doPage is only ever called with either -1 or 1.
-
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. 😕
-
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. 😕
-
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. 😕
-
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. 😕
-
Theory: the world's infatuation with weakly typed languages was exacerbated because the bastion of compile-time #strongtyping was #microsoft... and MS *sucks* at it! They switched their mvc json parser from newtonsoft to something that only works sometimes.. you want to have a configurable webhook? Be ready for the fact that `System.Net.Http.HttpMethod` is a class and not an enum. Solely so that you can give a non-compliant string as your http method. There *are* verbs enums... buried elsewhere. *and*, when youre trying to call your configurable webhook, *surprise*! The "request" object knows what headers ought to be on a different type (i.e., "content"), and throws an exception if you give it a header it finds unappetizing. fucking.... whyyyyyyy? This is creating types because you can, not because they need to exist!
-
Just updated the Database App Modules tutorial in the Kitten documentation to fix a few bugs, update to latest Kitten syntax, and improve the instructions:
https://kitten.small-web.org/tutorials/database-app-modules/
(Database app modules are special app modules¹ that let you create strongly-typed JavaScript databases² in your Small Web³ apps.)
Enjoy!
:kitten:💕
¹ https://kitten.small-web.org/reference/#app-modules
² https://codeberg.org/small-tech/jsdb#readme
³ https://ar.al/2024/06/24/small-web-computer-science-colloquium-at-university-of-groningen/#Kitten #DatabaseAppModules #AppModules #tutorial #SmallWeb #SmallTech #web #dev #JSDB #JavaScriptDatabase #JavaScript #database #web #dev #NodeJS #strongTyping
-
Just updated the Database App Modules tutorial in the Kitten documentation to fix a few bugs, update to latest Kitten syntax, and improve the instructions:
https://kitten.small-web.org/tutorials/database-app-modules/
(Database app modules are special app modules¹ that let you create strongly-typed JavaScript databases² in your Small Web³ apps.)
Enjoy!
:kitten:💕
¹ https://kitten.small-web.org/reference/#app-modules
² https://codeberg.org/small-tech/jsdb#readme
³ https://ar.al/2024/06/24/small-web-computer-science-colloquium-at-university-of-groningen/#Kitten #DatabaseAppModules #AppModules #tutorial #SmallWeb #SmallTech #web #dev #JSDB #JavaScriptDatabase #JavaScript #database #web #dev #NodeJS #strongTyping
-
Just updated the Database App Modules tutorial in the Kitten documentation to fix a few bugs, update to latest Kitten syntax, and improve the instructions:
https://kitten.small-web.org/tutorials/database-app-modules/
(Database app modules are special app modules¹ that let you create strongly-typed JavaScript databases² in your Small Web³ apps.)
Enjoy!
:kitten:💕
¹ https://kitten.small-web.org/reference/#app-modules
² https://codeberg.org/small-tech/jsdb#readme
³ https://ar.al/2024/06/24/small-web-computer-science-colloquium-at-university-of-groningen/#Kitten #DatabaseAppModules #AppModules #tutorial #SmallWeb #SmallTech #web #dev #JSDB #JavaScriptDatabase #JavaScript #database #web #dev #NodeJS #strongTyping
-
Just updated the Database App Modules tutorial in the Kitten documentation to fix a few bugs, update to latest Kitten syntax, and improve the instructions:
https://kitten.small-web.org/tutorials/database-app-modules/
(Database app modules are special app modules¹ that let you create strongly-typed JavaScript databases² in your Small Web³ apps.)
Enjoy!
:kitten:💕
¹ https://kitten.small-web.org/reference/#app-modules
² https://codeberg.org/small-tech/jsdb#readme
³ https://ar.al/2024/06/24/small-web-computer-science-colloquium-at-university-of-groningen/#Kitten #DatabaseAppModules #AppModules #tutorial #SmallWeb #SmallTech #web #dev #JSDB #JavaScriptDatabase #JavaScript #database #web #dev #NodeJS #strongTyping
-
Just updated the Database App Modules tutorial in the Kitten documentation to fix a few bugs, update to latest Kitten syntax, and improve the instructions:
https://kitten.small-web.org/tutorials/database-app-modules/
(Database app modules are special app modules¹ that let you create strongly-typed JavaScript databases² in your Small Web³ apps.)
Enjoy!
:kitten:💕
¹ https://kitten.small-web.org/reference/#app-modules
² https://codeberg.org/small-tech/jsdb#readme
³ https://ar.al/2024/06/24/small-web-computer-science-colloquium-at-university-of-groningen/#Kitten #DatabaseAppModules #AppModules #tutorial #SmallWeb #SmallTech #web #dev #JSDB #JavaScriptDatabase #JavaScript #database #web #dev #NodeJS #strongTyping
-
New blog post: Why Strong Typing Is Preferable To Weak Typing
https://www.tjdraper.com/blog/weak-typing-is-bad-and-it-should-feel-bad/
-
New blog post: Why Strong Typing Is Preferable To Weak Typing
https://www.tjdraper.com/blog/weak-typing-is-bad-and-it-should-feel-bad/
-
New blog post: Why Strong Typing Is Preferable To Weak Typing
https://www.tjdraper.com/blog/weak-typing-is-bad-and-it-should-feel-bad/
-
New blog post: Why Strong Typing Is Preferable To Weak Typing
https://www.tjdraper.com/blog/weak-typing-is-bad-and-it-should-feel-bad/
-
New blog post: Why Strong Typing Is Preferable To Weak Typing
https://www.tjdraper.com/blog/weak-typing-is-bad-and-it-should-feel-bad/
-
Updating (#PHP) packages to @reactphp Promise v3, and test your types with @phpstan: https://blog.wyrihaximus.net/2024/06/updating-php-packages-to-reactphp-promise-v3--and-test-your-types-with-phpstan/
#php #reactphp #phpstan #staticanalysis #template #strongtyping
-
Updating (#PHP) packages to @reactphp Promise v3, and test your types with @phpstan: https://blog.wyrihaximus.net/2024/06/updating-php-packages-to-reactphp-promise-v3--and-test-your-types-with-phpstan/
#php #reactphp #phpstan #staticanalysis #template #strongtyping
-
Updating (#PHP) packages to @reactphp Promise v3, and test your types with @phpstan: https://blog.wyrihaximus.net/2024/06/updating-php-packages-to-reactphp-promise-v3--and-test-your-types-with-phpstan/
#php #reactphp #phpstan #staticanalysis #template #strongtyping
-
Updating (#PHP) packages to @reactphp Promise v3, and test your types with @phpstan: https://blog.wyrihaximus.net/2024/06/updating-php-packages-to-reactphp-promise-v3--and-test-your-types-with-phpstan/
#php #reactphp #phpstan #staticanalysis #template #strongtyping
-
Updating (#PHP) packages to @reactphp Promise v3, and test your types with @phpstan: https://blog.wyrihaximus.net/2024/06/updating-php-packages-to-reactphp-promise-v3--and-test-your-types-with-phpstan/
#php #reactphp #phpstan #staticanalysis #template #strongtyping
-
A well written article, worth reading regardless of the camp you’re in.
https://www.svix.com/blog/strong-typing-hill-to-die-on/
#strongtyping #typescript #javascript -
A well written article, worth reading regardless of the camp you’re in.
https://www.svix.com/blog/strong-typing-hill-to-die-on/
#strongtyping #typescript #javascript -
A well written article, worth reading regardless of the camp you’re in.
https://www.svix.com/blog/strong-typing-hill-to-die-on/
#strongtyping #typescript #javascript -
A well written article, worth reading regardless of the camp you’re in.
https://www.svix.com/blog/strong-typing-hill-to-die-on/
#strongtyping #typescript #javascript -
A well written article, worth reading regardless of the camp you’re in.
https://www.svix.com/blog/strong-typing-hill-to-die-on/
#strongtyping #typescript #javascript