Re: [heycam/webidl] What is "missing" special value? (#794)

There is no IDL value of `Undefined`, right?  So I am not sure what that last question means, exactly.

In terms of programming languages, people can represent "missing" however they want, on the IDL implementation side, but I would expect it to be implemented as `undefined` in ES, as a `None`-valued `Option` in Rust, an `std::optional` with `has_value` false in C++ (or some equivalent), as `None` in Python.  In C one would need to pick some implementation (whether null pointer or a struct like `std::optional`).  In Java you'd use `null`, probably.

I'm not sure what makes you say that common programming languages "don't have similar features"; it seems like they all have a way to represent "there is no thing here"...

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/heycam/webidl/issues/794#issuecomment-529448227

Received on Monday, 9 September 2019 12:25:43 UTC