home.social

#statictyping — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #statictyping, aggregated by home.social.

  1. 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

  2. type annotations are cool, but there are definitely cases when they get in the way, like traversing some unknown data structure:

    github.com/cthoyt/orcidio/blob

    context: this traverses an OBO Graph JSON to find ORCID identifiers, and would be way too complicated to get all corner cases

    #typing #statictyping #python #orcid #obo #json #recursion #dynamic

  3. For long there has been debate about #StaticTyping vs #DynamicTyping in #programming. Frequently claims are made that static typing reduces bugs. Purely anecdotally I have not personally found that to be significantly true, and static typing can make coding slower with less flexibility (then again I am a #Tcl guy, and also prefer pure #Javascript to #TypeScript).

    Here is a great read that analyses various studies made on the topic: danluu.com/empirical-pl/