Re:Writing a SQL database from scratch in Go
by phamilton on Sunday April 12, 2020 @11:28PM
(#22852945)
The IDE will autocomplete selectKeyword but not "select".
Other type systems, like TypeScript, support string literal types, and in Typescript we generally would just define the keyword type to be a union of string literals and then use those string literals in the code.
But without string literal types, using a string constant gives the compiler more information it can use to make sure your code is correct. That's a useful thing to have.
Other type systems, like TypeScript, support string literal types, and in Typescript we generally would just define the keyword type to be a union of string literals and then use those string literals in the code.
But without string literal types, using a string constant gives the compiler more information it can use to make sure your code is correct. That's a useful thing to have.