by ice109 · 9y ago · 0 comments
Algol-68RS, CLU, Mesa/Cedar, Oberon, Oberon-2, Oberon-07, Active Oberon, Modula-2+, Modula-3, Eiffel, Component Pascal, Swift (RC is a GC algorithm), Standard ML, MLton, Sing#, System C#, .NET Native (VB.NET and C#)
Being able to represent both their height in centimeters and their age in days in a 32-bit integer is pointless trivia unless you're designing a bits-on-the-wire network protocol specification, or interfacing with hardware registers, or designing a binary file format, in which case C's type system still doesn't give you enough information, because endianness is not specified.
Object systems are an attempt at solving the "Foogols don't have real type systems" problem, but they drag in notions of hierarchy which don't always fit outside of toy problems, and not even then. Plus, Smalltalk-style object systems which mandate that everything must work via message-passing drags in even more complexity orthogonal to the idea of finally having a semantic type system. And as long as there are still size specification pseduo-types, boxed or unboxed, the type system still has an inherent hole in it, because you can still say nonsense which type-checks perfectly cleanly.
So saying Go has a strong type system and comparing it to OCaml or Haskell is meaningless, because the two kinds of type systems (that is, real, semantic type systems versus size specifications) aren't trying to do the same thing.
Any two type systems can be meaningfully compared. My comparison was exceptionally broad and seems perfectly consistent with everything you said.
There are lots of type system features in Algol variants that you cannot express in Go.