@main[]
$void_methods[^reflection:methods[void]]
$string_methods[^reflection:methods[string]]
^if($void_methods != $string_methods){
String has ^string_methods._count[] while void has ^void_methods._count[].
}
$s[]
$w[ ]
$v[$void]
Empty string vs void:
Json: ^json:string[$s] vs ^json:string[$v]
Json (void as string): ^json:string[$s;$.void[string]] vs ^json:string[$v;$.void[string]]
Json (void as null): ^json:string[$s;$.void[null]] vs ^json:string[$v;$.void[null]]
Length: ^s.length[] vs ^v.length[]
Double: ^s.double(0) vs ^v.double(0)
Base64: "^s.base64[]" vs "^v.base64[]"
Hash compatibility: "$s.key" "$w.key" "$v.key"
More hash compatibility: "^b[^s.contains[key]]" "^b[^w.contains[key]]" "^b[^w.contains[key]]"
Methods are not visible: "^show[$s.length]" "^show[$w.length]" "^show[$v.length]"
Non-empty or whitespace string not hash compatible: ^try-catch{
$s[string]
$s.key
}
Absent method empty string error: ^try-catch{
$s[]
^s.something[]
}
Absent method void error: ^try-catch{
^v.something[]
}
Absent method non-empty string error: ^try-catch{
$s[string]
^s.something[]
}
^string_methods.foreach[k;v]{
^if(!^void_methods.contains[$k]){
String method $k absent in void
}
}
@b[v]{
^if($v){true}{false}
@show[v]
$v.CLASS_NAME
E-mail: