When you say "polymorphism", I think you might mean "inheritance"?
(Go-with-generics already has two kinds of polymorphism)
I don't really understand what you're trying to accomplish here. Perhaps
you could explain your motivation a bit more?
On Fri, 3 Jul 2020, 21:22 Aleksandar Milovanović,
wr
Sorry, you are right, inheritance is a better term.
As written in the test, I unmarshalled the json array to a slice of
different types boxed to the base structure (so I can safely use all the
base fields in slice elements) and I can safely cast elements to
specialized struct (in which I can safel
Thank you, perhaps two cases are quite equivalent when used with
semaphores.
3 Temmuz 2020 Cuma 18:29:41 UTC+3 tarihinde Andrei Tudor Călin yazdı:
>
> Check out Bryan's talk[0], in particular from ~27:00 onward, where worker
> pools are discussed. I highly recommend the entire talk.
>
> [0] htt
https://tjpalmer.github.io/languish/
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web
Hey! The new draft is way better than previous, but it still allows to write
some tricky code.
func String(type T fmt.Stringer) (x T) string {
return x.String()
}
This is not really a good type parametrization example. Why to have such a
feature? What is the point? What is the difference be
On Thu, Jul 2, 2020 at 2:18 PM wrote:
>
> We have developed a Go API (which we call a Go wrapper -
> https://pkg.go.dev/lang.yottadb.com/go/yottadb?tab=doc) to the YottaDB
> hierarchical key-value database (https://yottadb.com). It works well for the
> most part, but there are some edge cases d
On Sat, Jul 4, 2020 at 12:06 PM wrote:
>
> Hey! The new draft is way better than previous, but it still allows to write
> some tricky code.
>
> func String(type T fmt.Stringer) (x T) string {
> return x.String()
> }
>
> This is not really a good type parametrization example. Why to have such
>> Wondering why there's no http.ServeStream() API to do chunked
>> transfer-encoding (or the http2 equivalent), in addition to the nice
>> features of ServeContent()...
Uh-huh. It would be nice to be able to use the If-None-Match logic for
unseekable strings.
> Maybe because the current Serve
Both
type X int | string
and
type X interface int, string
Are meant to be a syntax sugar for:
type X interface {
type int, string
}
It is not a sum type, but rather a generic type that needs to be
instantiated before the use. That is why it cannot have a zero value:
var x X // error, X mus
The fact that JS is top and above TyoeScript says a lot.
> On Jul 4, 2020, at 11:49 AM, Everton Marques
> wrote:
>
>
> https://tjpalmer.github.io/languish/
>
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this
Hi!
I have a small app like
func main() {
start := time.Now()
…
fmt.Println(time.Since(start))
}
where output is ≈400μs but the actual time is about 0.16s, I mean
$ time app-name
real 0m0,156s
user 0m0,238s
sys 0m0,054s
Profiling collects nothing (it is expected with ≈400μs of
On Sat, Jul 4, 2020 at 5:24 PM Denis Cheremisov
wrote:
> I have a small app like
>
> func main() {
> start := time.Now()
> …
> fmt.Println(time.Since(start))
> }
>
> where output is ≈400μs but the actual time is about 0.16s, I mean
>
I can't reproduce and since it is really rare
On Sat, Jul 4, 2020 at 5:50 PM wrote:
> Both
>
> type X int | string
>
> and
>
> type X interface int, string
>
> Are meant to be a syntax sugar for:
>
> type X interface {
> type int, string
> }
>
> It is not a sum type, but rather a generic type that needs to be
> instantiated before the use.
13 matches
Mail list logo