3 ms·
Most of the well thought out writeups on types that I've seen put them on two different scales - Strong vs Weak - how does the language convert between types
by RHSeeger 1y ago
Most of the well thought out writeups on types that I've seen put them on two different scales
- Strong vs Weak - how does the language convert between types
- Static vs Dynamic - Does type information apply "early" or "late" (not sure what the right term here, but generally "when it's compiled" vs "when it's run"). I've also seen this as whether the type information is applied to the variable (name of/thing that points at the value) or the value itself; which tends to work out to the same thing.
Which is, I think, more or less saying here. Just with more words.
- bhk 1y agoRe: conversion between types Most languages can be placed somewhere on a strong-weak spectrum, but JavaScript is an outlier. Two "equal" values can implicitly convert to opposite boolean values, or different numeric values, or different string values. Not just weak... maybe pathological is a better term.
- bloppe 1y agoIn static languages, variables have types. In dynamic languages, values have types.