4 ms·
I'm not too familiar with PowerShell, but I wonder if they could introduce new syntax to fix this. Add a new statement, like import, include, use, or using; if
by SloopJon 10y ago
I'm not too familiar with PowerShell, but I wonder if they could introduce new syntax to fix this. Add a new statement, like import, include, use, or using; if your script includes that statement, you don't get the aliases unless you ask for them (e.g., using LegacyAliases).
- ambulancechaser 10y agoThe problem with that is that it breaks existing scripts. If you have to update old scripts, why try to maintain the legacy stuff in the first place.
- SloopJon 10y agoNo, it doesn't, because existing scripts don't include this new statement. You only have to make your aliases explicit if you edit a script to use this new namespace/module feature.
- williamscales 10y agoVersion pinning? i.e. you specify in your script the version that you will use. Scripts missing the version pinning information run under backwards compatible mode. It...sorta worked for HTML? Over the long run, old pages could be phased out and now we have a pretty nice situation with HTML5.
- yellowapple 10y agoThis actually works reasonably well in Perl, where you can, for example, stick "use 5.22.2;" in a script and thus enable all the features of that version (and the versions before it) while keeping the features of newer versions disabled, thus ensuring backward compatibility.