Powershell as Programming Language

This topic contains 3 replies, has 4 voices, and was last updated by  Moon Sund 3 days, 6 hours ago.

  • Author
    Posts
  • #81751

    Moon Sund
    Participant

    Noticed lack of interest in our topic of fundamental books' authors.
    Does anybody know any articles concerning powershell as first-class language?

    For example, what about closures (see [scriptblock] methods)?
    Does pipelining involve monadic computation? :crazy:

  • #81773

    Richard Siddaway
    Moderator

    PowerShell in Action – Payette and Siddaway – covers PowerShell from a developers perspective and is probably closest to what you are looking for.
    Closures are possible in PowerShell and are covered on pages 374-378
    Pipeline operation is fully explained in the book.

    First-class language is very unclear in meaning.

    PowerShell is designed to be a shell and scripting language. While its .NET based your projects may be more suited to a language like C#. Without knowing what you're trying to achieve its impossible to state if Powershell is the correct solution

    • #82069

      Moon Sund
      Participant

      Richard Siddaway

      Thank you for the reference, right, hope it is closest
      The thing is 'programming languages community' ignores Powershell.
      I'd appreciate a reading from their perspective

  • #81875

    postanote
    Participant

    As noted PowerShell is a CLI, that can be used to write scripts / functions / modules even full programs for DevOps efforts and more.

    Visual Studios has PowerShell addons, so you can use it in your Visual Studio projects and are create UI's for your PowerShell scripts, etc..

    It can and does leverage the full .Net framework, so you can use .Net classes,enums, etc., to use in scripts, modules, functions. You can even write your own classes that can be use in PowerShell, in any .Net language.

    PowerShell available cmdlets are OS and version dependent. Meaning, not all cmdlers / capabilities are available on all targeted operating systems. PowerShell Core (Formally PowerShell v6) is available on Windows, OSC, and Linux, but of course more full features in Windows, but changes are still coming. Use VSCode to develop PowerShell on all 3 platforms.

    The PowerShell ISE (a baseline IDE for scripting) is built in to PowerShell version 2 and higher, but that is a Windows only thing. Point of note. No more work is going into the PowerShell ISE, but it is not going away. VSCode is the present and future direction for PowerShell development. You have to spend a few minutes settings it up for full PS development though, using the built-in AddOn extensions.

    VSCode will not do all that the PowerShell ISE will do and vice versa.

You must be logged in to reply to this topic.