Consider two approaches to dropping a non-existent column:
DT[, !"b"]
# vs
DT[, .SD, .SDcols = !"b"]
The former is currently a warning, the latter an error:
# Warning message:
# In `[.data.table`(available_configs, , !"abc") :
# column(s) not removed because not found: [abc]
# vs
# Error in `[.data.table`(available_configs, , .SD, .SDcols = !"abc") :
# Some items of .SDcols are not column names: [abc]
It seems to me the latter should also be a warning.
The use case here is excluding a column programmatically, where it may or may not be present in the table -- I'm trying to exclude-if-present.