Skip to content

Completely remove inline-Python (::py::) from the language #6137

@marsninja

Description

@marsninja

Summary

Completely remove the inline-Python (::py:: ... ::py::) feature from the Jac language. The native backend already strips ::py:: blocks (they cannot be lowered to LLVM IR), which makes inline Python a source of divergence between the bytecode/Python pathway and the native pathway. Rather than implement it in native, we want to drop the feature from the language entirely.

Scope

  • Remove ::py:: grammar/lexer/parser support
  • Remove the corresponding AST node(s) for inline Python blocks
  • Remove handling across all compiler passes (Python codegen, native pass strip logic, type-checking, etc.)
  • Remove/migrate any usages of ::py:: in the standard library, examples, and tests
  • Update documentation and language reference to drop the construct
  • Provide a clear migration path / error message for code that still uses ::py:: (e.g. "inline Python is no longer supported; use a Python import instead")

Motivation

  • Inline Python is fundamentally unsupportable in the native (LLVM) backend, creating a permanent feature gap between pathways.
  • It bypasses Jac's type system and tooling.
  • Python interop is already achievable via standard import mechanisms, making ::py:: redundant.

Acceptance criteria

  • No ::py:: syntax is accepted by the parser; encountering it produces a clear, actionable error.
  • All references to inline Python are removed from grammar, AST, passes, stdlib, examples, tests, and docs.
  • Full test suite passes after removal/migration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions