loaddynamic

package
v0.33.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LoadDynamicFn

type LoadDynamicFn struct {
}

Implements the load_dynamic() built-in.

Most programming languages only support static import - where the module being loaded and the local variables being bound must be determinable at compile-time (i.e., without executing the code).

Dynamic import tends to be fairly contentious. Here's a good discussion on the topic:

https://github.com/tc39/proposal-dynamic-import

(TC39 - the JavaScript committee - is a generally good resource for programming language theory discussion, because there are so many open-source implementations of the core language.)

load_dynamic() provides a dynamic import, with semantics similar to nodejs require(), where it returns a dictionary of symbols that can be introspected on. It does no binding of local variables.

func NewPlugin added in v0.22.4

func NewPlugin() LoadDynamicFn

func (LoadDynamicFn) OnStart

func (LoadDynamicFn) OnStart(e *starkit.Environment) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL