Do you find you often need to check for valid variable values? Me too.
For example, here is part of the make-module intrinsic that checks important fields of a module's specification:
; Validate the important fields:
unless all [
object? obj: :spec
block? obj: :body
none? obj: spec/name
none? obj: spec/version
print ["error in module at:" obj] ; temp
cause-error 'script 'invalid-spec :obj ; something is wrong here!
It's just a bit wordy, isn't it?
That code has just been replaced with the assert native and now looks like this:
spec/name [word! none!]
spec/version [tuple! none!]
It's a bit like a function spec, isn't it? Of course, it also provides the simplified datatype form, as seen in the first two words.
Here's more information about the assert function, which will be released in R3 A38.
Note that assert is very efficient because it does not need to reduce. In addition, it does a simple get on variables; therefore, avoiding problems with possible function evaluation (i.e. it is secure). That means you can use it at the entry point to any section of code that might go wrong if functions are passed.
This is another one of those I've been putting it off for years, but it's used often and worth adding to the language.