DEV Community

Discussion on: Static Typing or Typescript

Collapse
 
jessekphillips profile image
Jesse Phillips

Git only identifies content modification conflicts, it will not tell you the data no longer contains the property you are looking for. This relates more to private API were rigidity on defined APIs are more fluid, granted internal APIs can deserve the same rigidity.

I agree that the examples have system boundary issues, which is not language specific in fact mine was in C#.

People better understand the importance of defining their interfaces across systems, but like you did can easily dismiss the importance for internal interfaces as "git will catch it".

Collapse
 
jwp profile image
John Peters • Edited

I think my git comment was in thinking of a new type in current branch where there are other non merged branches that didn't know about the new design change. I agree Git would never find that edge case.

The problem of 'it will not detect the property ' is true in Javascript and one pitfall that can cause headaches. Its the primary reason I prefer Typescript, where for example, it's impossible to misspell a property name. I have seen dynamic Javascript object property misspelling.

Yes, well defined interfaces are required but not always present. Any code like that is of poor quality.

Thread Thread
 
jessekphillips profile image
Jesse Phillips

Since my context is with test code, everything is internal. I've tried hard to use appropriate depreciation (is that even a thing in Javascript?) but I have had slip ups and it is nice to have a type system to keep things in check.