r/programming • • Jun 27 '18

Python 3.7.0 released

https://www.python.org/downloads/release/python-370/
2.0k Upvotes

383 comments sorted by

View all comments

Show parent comments

0

u/[deleted] Jun 28 '18

[deleted]

5

u/Homoerotic_Theocracy Jun 28 '18

Except here it isn't and this isn't void* and there is no erasure.

The entire point is that it saves the type-tag which continues to exist at runtime.

As the documentation says it is type-safe; that's different from void* which is pretty unsafe.

0

u/[deleted] Jun 28 '18

[deleted]

8

u/Homoerotic_Theocracy Jun 28 '18

Yeah so where do you keep bringing auto up? You're not using std::any and I'm not talking about auto.

I'm not sure that has to do with no dynamic typing since you're not using it but the static typing instead obviously you don't get it; use std::any to get a dynamically typed variable that can hold any type.

→ More replies (2)