You certainly do not always want to write _,_ = fmt.Println("Hello, playground"), and I think this points out the real lack. What do you want your program to do if fmt.Println starts failing? I think, unless you are explicitly checking for errors, that in all other cases you want it to crash. Rather than silently continue. Which is a bug, and a potentially disastrous one, that is endemic in Go code (and, to be fair, plenty of other languages). Thankfully the practical risk of this particular case is tiny.
This is why you want unchecked errors to implicitly bubble up. Which is what exceptions give you, or perhaps a syntax with implicit error return values rather than Go's by-convention approach.
The language to access a relational database is always SQL. So much than a lot of people doesn't make any difference between SQL and a DBMS.
Aren't we in the same situation as Javascript on the web?
I always had wondered why there is no effort like Webasm for relational database.
I would love to see a more vibrant scene with different syntax, paradigm and ideas.
What would be the rust equivalent of a relational language, the Go equivalent?
Because you should stop asking for generics like in Java/C#/rust etc..
Such generic to make custom type safe container is like using a canon to kill a fly.
You should ask for generic package/templated package.
It solve the problem, it's way simpler and and would only touch a small part of the spec.
More importantly, it wouldn't change the way we code in go today.
With generic package you only have to define the parameter in package declaration like this:
package list {Value: interface{}
And use it by importing it like this:
import list "container/list" {Value: int}
And that's why to go team asked for use case. To use the most simple tool to fix a problem so there is less chance for other problems to appear.
If every people wanting to make custom type safe container would stop asking for full generics and instead would brought their case with a simpler solution. I'm sure it would have a chance to go in Go 2.0.
import list "container/list" {Value: int}
import list "container/list" {Value: string}
in a single source file. At the least, you would need the ability to give the type(s) that those import statements import distinctive names.
Even that would, IMO, not be enough, as this seems (from what I infer the semantics to be) to make it impossible for writers of such a generic library to build on another generic library.
That can be fixed by allowing such a programmer to write:
package foo {MyValue: interface{}}
...
import list "container/list" {Value: MyValue}
but that, IMO, would be way too cumbersome. That package declaration would have to mention all types in all generic packages that get imported.
i'm sorry, what in my post made you think i wouldn't be happy with your solution ?
i would even be happy with no generic at all if basic types implemented low level interfaces, and let me code my containers against things like "sortable, equatable, hashable" ( although it may pose other problems).
It work quite well for package like a Map so any data structure/algorithm. I suspect it would be less ideal for filter/map/reduce.