Skip to content

language: scoped model definition #640

@Jozott00

Description

@Jozott00

I'm not sure how feasible it is, but it would be nice if one could specify models that are only available in the current model scope.

model A(): Ex = {
  scoped model Expr(): Ex = { 2 }
  $Expr()
}

constant X = $A()

$Expr() // error: Unknown Model `$Expr` 

This would allow one to dynamically create a model within a model without causing name conflicts between them.

@flofriday How easy would it be to implement this?

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestfrontendThis is frontend relatedlanguageLanguage changes

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions