4 ms·
Not sure what they are referring to, but it may be that you can declare things as having one of several types (e.g. int|string|void) or even that something can
by 2mlWQbCK 1y ago
Not sure what they are referring to, but it may be that you can declare things as having one of several types (e.g. int|string|void) or even that something can be any type at all (i.e. turn off static type-checking for that thing)? I do not think the type-checker will ever randomly decide to just not check a type given that you have provided types for it to check, but it was a long time ago since I had to read or write any Pike code.
- metalliqaz 1y agoI can turn off static type checking for a thing in C by using `void*`
- pansa2 1y agoLooks like there’s a `mixed` type, variables of which can hold values of any type. But at least that’s something you can `grep` for. A more subtle issue with type hints (as in TypeScript/Python, not sure if this applies to Pike) is that there are ways to work around the type system. You can get, for example, a variable of type `int` that actually holds a `list`: https://news.ycombinator.com/item?id=43508152 https://news.ycombinator.com/item?id=43508152