Where did you hear that is it "inadvisable" ?
One thing worth noting with TWO_TASK is that it is incompatiable with wallet credentials. Take a look here
https://connor-mcdonald.com/2015/09/21/connection-shortcuts-with-a-wallet/ on how you can setup wallets to avoid passwords on the command line, but notice below that it will not work with TWO_TASK.
C:\Users\hamcdc>sqlplus /@mydb
SQL*Plus: Release 12.2.0.1.0 Production on Mon Jan 22 11:18:52 2018
Copyright (c) 1982, 2016, Oracle. All rights reserved.
Last Successful login time: Sun Jan 14 2018 17:38:26 +08:00
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
C:\Users\hamcdc>set TWO_TASK=mydb
C:\Users\hamcdc>sqlplus /
SQL*Plus: Release 12.2.0.1.0 Production on Mon Jan 22 11:19:00 2018
Copyright (c) 1982, 2016, Oracle. All rights reserved.
ERROR:
ORA-01017: invalid username/password; logon denied