Today at work I learned that you can make `.d.ts` files adjacent to `.js` files and TypeScript's compiler (and IDEs) can treat it just like Ruby + RBS sidecars! 😍
#JavaScript #TypeScript #Ruby #StaticTyping #TypeHints #DynamicLanguages #Programming
Today at work I learned that you can make `.d.ts` files adjacent to `.js` files and TypeScript's compiler (and IDEs) can treat it just like Ruby + RBS sidecars! 😍
#JavaScript #TypeScript #Ruby #StaticTyping #TypeHints #DynamicLanguages #Programming
Raise a hand if you find dynamic typing disfavourable!
Play Static Games, Win Static Prizes https://screwlisp.small-web.org/programming/play-static-games-win-static-prizes/
#staticTyping #typechecking #staticProgramAnalysis #commonLisp #lisp #sbcl #series #acl2
In which I look at modern and to some extent historical static program analysis popularly used with common lisp #programming.
I accidentally make the really good point that even if #sbcl is not your deployment target, you can still use its static type checking, for which I work an example.
#lazyEvaluation and formal theorems are also included.
@mdhughes @screwtape @smlckz @sektor @clew @eduardoochs @dougmerritt
The point is not that static type checking is omnipotent: it isn't, of course.
The point is that it catches _very many_ mistakes that programmers are _prone_ to make.
I say again: mistakes that are _often_ made, not all that can be made _in principle_.
> function addints(int x, int y) : int { return 3; }
This is too trivial.
Warning: variable declared but never used.
🐘 The case against static typing in PHP | Tony Marston
https://www.tonymarston.net/php-mysql/against-static-typing-in-php.html
Yes, You Can Use Different Types With the Same Structure
This is a story of how we fixed multiple bugs by typing our array indexes.
This Friday I had the privilege of giving the Zagreb #Python meetup a talk on the why, when not and how of #statictyping in Python.
We in the Python community are given this incredible choice between writing dynamically typed code for fast prototyping or using a pretty sophisticated (IMO stronger than Java, Go or even C#) type system for bigger projects. Or anything in between.
The situation isn't perfect, of course, but this is still pretty amazing. Most programming languages don't get this.
"Do it in #Rust from the beginning!" - Jon Gjengset
Very nice:
“Parse, Don’t Validate” [2019], Alexis King (https://lexi-lambda.github.io/blog/2019/11/05/parse-don-t-validate/).
On HN: https://news.ycombinator.com/item?id=21476261 & https://news.ycombinator.com/item?id=27639890 & https://news.ycombinator.com/item?id=35053118
On Lobsters: https://lobste.rs/s/uemphs/parse_don_t_validate
H/T: Jesse Frazelle