You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Usually in programming languages we use undefined or null to specify a hole with absent of value, nor fields, and they are usually a single global value that retains a same meaning across the context and function scopes.
But I am wondering if there would be a interesting feature, if we enable these holes to "contain fields or values", and their "absent" are just a kind of hiding.
For example, these codes won’t be possible in an imperfect language like JavaScript or C#:
Thanks to the different levels of equality check in DreamBerd, we can also do comparisons like this:
var hole1 = undefined!
var hole2 = undefined!
hole1 === hole2! // true
hole1.baaz = "bomb"!
hole1 === hole2! // false, or maybe?
hole1 == hole2! // true
Similarly, we can suggest functions and other complex structures inside a undefined value, and this would make things more exciting.
I hope that with this enhancement we can fill a hole in the semantics of undefined values that are often missed in those imperfect languages, to enforce a better programming language.
The text was updated successfully, but these errors were encountered:
Usually in programming languages we use
undefined
ornull
to specify a hole with absent of value, nor fields, and they are usually a single global value that retains a same meaning across the context and function scopes.But I am wondering if there would be a interesting feature, if we enable these holes to "contain fields or values", and their "absent" are just a kind of hiding.
For example, these codes won’t be possible in an imperfect language like JavaScript or C#:
Thanks to the different levels of equality check in DreamBerd, we can also do comparisons like this:
Similarly, we can suggest functions and other complex structures inside a undefined value, and this would make things more exciting.
I hope that with this enhancement we can fill a hole in the semantics of undefined values that are often missed in those imperfect languages, to enforce a better programming language.
The text was updated successfully, but these errors were encountered: