![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Convert/ConvertTo/ConvertFrom -> To/From? The original spec for PS included a verb Convert. It is currently not used, although we have ConvertFrom and ConvertTo for SecureString. I would like to suggest that the ConvertFrom/ConvertTo verbs be discarded in favor of the (from an Anglophonic perspective) concise, descriptive, and intuitive words To and From. Convert may be reserved for further use. Here's the rationale. Convert is extremely broad and doesn't really communicate a lot about what is happening. Convert-SecureString could be modified to take custom -To and -From parameters, or even use a -From or -To switch, but it would be less intuitive and would generally require cmdlets implementing a LOT of functionality for this symmetry. Since this isn't always possible, custom Convert-* cmdlets would often be lacking some functionality as well. Using To and From gives us pithy, intuitive PowerShell verbs that are already encountered regularly in .NET (the ubiquitous ToString() method, for example). They form a logical family of their own (probably including "Convert" if it is reserved). Cmdlets can be implemented to perform simple conversions in one direction, and allow multiple or alternative implementations for the other direction. Finally, please note that it really and truly is OK to use words like this as verbs. PowerShell uses English words, but it is its own language. In the context of PowerShell, a verb is a verb based on role. ![]() |
My System Specs![]() |
| | #2 (permalink) |
| | RE: Convert/ConvertTo/ConvertFrom -> To/From? Reminds me on a similar discussion in the old NG about some verbs that are used in the current build: http://www.microsoft.com/communities...bcb&sloc=en-us I hope that the team has some time left to review all used verbs, cmdlet names and the naming guidelines again (and change if needed) before the release of PoSh V1. -- greetings dreeschkind "Alex K. Angelopoulos [MVP]" wrote: > The original spec for PS included a verb Convert. It is currently not used, > although we have ConvertFrom and ConvertTo for SecureString. > > I would like to suggest that the ConvertFrom/ConvertTo verbs be discarded in > favor of the (from an Anglophonic perspective) concise, descriptive, and > intuitive words To and From. Convert may be reserved for further use. Here's > the rationale. > > Convert is extremely broad and doesn't really communicate a lot about what > is happening. Convert-SecureString could be modified to take custom -To > and -From parameters, or even use a -From or -To switch, but it would be > less intuitive and would generally require cmdlets implementing a LOT of > functionality for this symmetry. Since this isn't always possible, custom > Convert-* cmdlets would often be lacking some functionality as well. > > Using To and From gives us pithy, intuitive PowerShell verbs that are > already encountered regularly in .NET (the ubiquitous ToString() method, for > example). They form a logical family of their own (probably including > "Convert" if it is reserved). Cmdlets can be implemented to perform simple > conversions in one direction, and allow multiple or alternative > implementations for the other direction. > > Finally, please note that it really and truly is OK to use words like this > as verbs. PowerShell uses English words, but it is its own language. In the > context of PowerShell, a verb is a verb based on role. ![]() > > > |
My System Specs![]() |
| | #3 (permalink) |
| | Re: Convert/ConvertTo/ConvertFrom -> To/From? Interesting; it looks like there's intent to expand the role of such cmdlets, so it does make sense to have simpler general verbs for the conversions. I posted my suggestion in Connect: https://connect.microsoft.com/feedba...8519&SiteID=99 "dreeschkind" <dreeschkind@discussions.microsoft.com> wrote in message news:27FCD40F-E474-44EB-AF9B-5BDC62FC65A6@microsoft.com... > Reminds me on a similar discussion in the old NG about some verbs that are > used in the current build: > > http://www.microsoft.com/communities...bcb&sloc=en-us > > > I hope that the team has some time left to review all used verbs, cmdlet > names and the naming guidelines again (and change if needed) before the > release of PoSh V1. > > -- > greetings > dreeschkind > > > "Alex K. Angelopoulos [MVP]" wrote: > >> The original spec for PS included a verb Convert. It is currently not >> used, >> although we have ConvertFrom and ConvertTo for SecureString. >> >> I would like to suggest that the ConvertFrom/ConvertTo verbs be discarded >> in >> favor of the (from an Anglophonic perspective) concise, descriptive, and >> intuitive words To and From. Convert may be reserved for further use. >> Here's >> the rationale. >> >> Convert is extremely broad and doesn't really communicate a lot about >> what >> is happening. Convert-SecureString could be modified to take custom -To >> and -From parameters, or even use a -From or -To switch, but it would be >> less intuitive and would generally require cmdlets implementing a LOT of >> functionality for this symmetry. Since this isn't always possible, custom >> Convert-* cmdlets would often be lacking some functionality as well. >> >> Using To and From gives us pithy, intuitive PowerShell verbs that are >> already encountered regularly in .NET (the ubiquitous ToString() method, >> for >> example). They form a logical family of their own (probably including >> "Convert" if it is reserved). Cmdlets can be implemented to perform >> simple >> conversions in one direction, and allow multiple or alternative >> implementations for the other direction. >> >> Finally, please note that it really and truly is OK to use words like >> this >> as verbs. PowerShell uses English words, but it is its own language. In >> the >> context of PowerShell, a verb is a verb based on role. ![]() >> >> >> |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| convertto-HTML | PowerShell | |||
| convertto-html | PowerShell | |||
| ConvertTo-Html | PowerShell | |||
| RC2 - Help bug for Convertto-html | PowerShell | |||
| HowTo: Use ConvertTo-SecureString and ConvertFrom-SecureString | PowerShell | |||