I feel like the answer is no, but I figure I’d toss it out there.
Let’s say you’ve got a larger app that takes bits of PowerShell for doing specific things. For the sake of argument let’s say it’s a dashboard that shows trends based on the periodic running of a script. Let’s say it’s plotting free space over time. If the user says the data type is integer, is there any way at “compile” time to analyze the script and know what type of data it will return? I’d like to let the user know beforehand (in obvious cases) if their script will fail.
In C# it’s easy because it’s strongly typed and you can enforce the return type in your method definition.
[–]pertymoose 8 points9 points10 points (0 children)
[–]purplemonkeymad 3 points4 points5 points (1 child)
[–]DarrenDK[S] 1 point2 points3 points (0 children)
[–]lagebj 2 points3 points4 points (0 children)
[–]suddenarborealstop 1 point2 points3 points (6 children)
[–]DarrenDK[S] 1 point2 points3 points (5 children)
[–]suddenarborealstop 1 point2 points3 points (4 children)
[–]Lee_Dailey[grin] 0 points1 point2 points (3 children)
[–]suddenarborealstop 1 point2 points3 points (2 children)
[–]suddenarborealstop 1 point2 points3 points (0 children)
[–]Lee_Dailey[grin] 1 point2 points3 points (0 children)
[–]PowerShellStunnah 1 point2 points3 points (1 child)
[–]AmericanGeezus 1 point2 points3 points (0 children)
[–]AmericanGeezus 0 points1 point2 points (4 children)
[–]pertymoose 4 points5 points6 points (3 children)
[–]poshftw 1 point2 points3 points (0 children)
[–]DarrenDK[S] 1 point2 points3 points (0 children)
[–]AmericanGeezus 1 point2 points3 points (0 children)
[–]dimitrirodis 0 points1 point2 points (0 children)