Skip to content

Add a "strict" mode that utilizes PowerShell API's less #23

@SeeminglyScience

Description

@SeeminglyScience

Currently comparison operators like -eq and -gt use methods from LanguagePrimitives to emulate PowerShell's comparison behavior and will also pull local variables from the scope the delegate is created in.

I'm starting to use PSLambda more and more as a sort of replacement for Add-Type. In these scenarios I think it ends up hurting more than helping.

I'd like a strict mode that:

  1. Can be turned on and off within the context of a delegate. (e.g. including a statement like enable strict or strict Comparisons, Variables)
  2. Can be turned on and off within the context of a script block (e.g. use strict { $a -eq $b })
  3. Disables pulling variables from the creation scope automatically, but still allows something like $using:variableName

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions