Re: [PSH] Methods/functions and blank spaces



I agree, its unfortunate we need this, but its the kind of tradeoff we have
to make because PowerShell is both a shell and a scripting language. In
shells people are used to using space as the delimiter.

copy a.txt b.txt
move a.txt b.txt
netstat -p tcp

Thus we need to support whitespace as a parameter delimiter. Other
programming languages on the other hand, don't need to support this.

We know people get really attached to their coding styles and this might
cause them some grief at first but hopefully they'll be able to live with
this. Its not a change we made lightly. Try it out. If people still can't
get used to this after some time then go ahead and open a feature request
bug asking us to change it back.

Thanks.
- Marcel


"Vasu" <Vasu@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:FABE51C0-1811-4E0B-85E5-A29FE98CB448@xxxxxxxxxxxxxxxx
I have used C, C++ and Java. None of these programming languages use space
as
a delimiter. If you want to pass multiple arguments to either a function
or a
method (of a class) then comma is your delimiter.
We changed this (nature's) design in Powershell to make space to be the
delimiter. I think this is a doomed design, just like no parenthesis for
multiple parameter subs in VBScript.

--Vasu.



.



Relevant Pages

  • Re: [PSH] Methods/functions and blank spaces
    ... to make because PowerShell is both a shell and a scripting language. ... Thus we need to support whitespace as a parameter delimiter. ...
    (microsoft.public.windows.server.scripting)
  • Re: csh what is the path separator
    ... $path is a shell variable, specific to csh and tcsh. ... a single string; it's a list of strings, each of which is a directory ... delimiter. ...
    (comp.unix.shell)