Re:Practical nil panic detection for Go
by nicoburns on Saturday November 18, 2023 @01:29PM
(#38322764)
Not at all. Otherwise brainfuck would be the simplest language to learn. How do you currently represent a type that is A or B in Go? You have to use an interface. That’s much more complex than using a sum type would be.
[ Parent
| on HN ]
Re:Practical nil panic detection for Go
by usrbinbash on Saturday November 18, 2023 @01:41PM
(#38322890)
Well, Brainfuck is simple to learn. The entire specification fits comfortably on a single page. Simple to learn doesn't automatically imply simple to use for any given purpose. The same is true for Go.
> You have to use an interface. That’s much more complex than using a sum type would be.
More complex how and by what metric?
Re:Practical nil panic detection for Go
by joshuamorton on Saturday November 18, 2023 @08:46PM
(#38327438)
> The entire specification fits comfortably on a single page
But to understand the specification and how it can be used to do a programming, you need to have at least a cursory understanding of turing machines and related theory, which isn't necessary to learn Java or python.
Under your definition, the conceptually simplest language is something like SUBLEQ, (the specification is only a single line!) but in this case, being able to implement the language, and learning the language aren't the same thing. Learning the language generally means, like, useful for given purposes.