News for hackers. Stuff that matters.
Re:Nil in Go is typed in theory and sort of untyped in practice by brundolf on Wednesday March 31, 2021 @01:48PM (#26650511)
I disagree. Issues like this on really core language primitives usually crop up when either:

1) The language lacked hindsight in its domain because there wasn't a ton of prior art (C)

2) The language didn't have enough foresight put into it (JavaScript)

3) The language's modern usage has drifted significantly far from its original usage (Java)

Python is an example of a language people use that doesn't suffer from #1 (thanks to Perl and friends), doesn't really suffer from #2 (at least, Python 3) and doesn't (yet) suffer too badly from #3. It has plenty of flaws and limitations, but not in its foundation. The core language primitives are rock-solid.

#1 doesn't apply to Go, and it's not old enough for #3 to apply. So that seems to only leave #2.

(I should add that this doesn't make a language completely invalid or useless. I use (and even like!) JS despite its flaws; in fact I prefer it to Python overall, mostly due to the ecosystem. It's just disappointing to see issues of type #2, because they seem so avoidable.)

Re:Nil in Go is typed in theory and sort of untyped in practice by nyanpasu64 on Wednesday March 31, 2021 @06:55PM (#26654206)
I think Python suffers from #3, as they've been adding new (controversial) syntax like typing, the := operator, and pattern matching. These were intended to help write real-world code at the cost of simplicity and applicability as a teaching language.
Re:Nil in Go is typed in theory and sort of untyped in practice by brundolf on Wednesday March 31, 2021 @07:12PM (#26654400)
It's starting to get there, yeah, though I think any sufficiently-popular language eventually gets there at a certain age
Re:Nil in Go is typed in theory and sort of untyped in practice by catlifeonmars on Wednesday March 31, 2021 @09:27PM (#26655613)
Eh, parsimony is nice to have, but at the end of the day, programming language design is just plain old engineering and engineers make tradeoffs to ship functional code that isn’t too terrible.
Re:Nil in Go is typed in theory and sort of untyped in practice by 13415 on Wednesday March 31, 2021 @02:13PM (#26650876)
It's pointless discussing this. There is no perfect language and every programming language I've ever seen has design problems at one level or another. I know enough of CL, Pascal, Modula, Ada, Rust, Nim, etc., to know their weaknesses, too.

Your C example is also not convincing. Lisp and Algol were already strong contenders at the time. People chose C because they needed a fast and close to metal language to create their own operating system for mainframes. It was a hack just like your category 2. Still, it's a great language.

Re:Nil in Go is typed in theory and sort of untyped in practice by brundolf on Wednesday March 31, 2021 @02:22PM (#26650997)
> There is no perfect language

> It's pointless discussing this

I don't see how the first implies the second. This is a programming forum; it's good to discuss and debate the specifics of these things.

C may not have been the best example of the category, but I think the category stands. Rust for example, much as I love it, is exploring uncharted territory. I wouldn't be surprised if 10 years from now we have ownership-based languages that are much easier to use, simply because lessons will have been learned by that point. Arguably Java's OOP fundamentals are not as good as C#'s because Java had to explore that territory first (setting aside technicalities about what the term "OOP" really means). Etc.

Re:Nil in Go is typed in theory and sort of untyped in practice by 13415 on Wednesday March 31, 2021 @03:21PM (#26651804)
The problem is that decades of experience has shown that only few programmers can discuss the advantages and disadvantages of programming languages for certain purposes in a halfway objective manner, and since few of them implement their own languages even the good discussions often remain fruitless.

I'll recommend Reddit's r/ProgrammingLanguages, as well as Scott's Programming Language Pragmatics as a reading instead. It's not fully up-to-date but I found the comparisons of features and their trade-offs in it fascinating.