arturo-lang / arturo

Simple, expressive & portable programming language for efficient scripting
http://arturo-lang.io
MIT License
723 stars 32 forks source link

[VM/lib] Merge constants and builtin's? #642

Open github-actions[bot] opened 2 years ago

github-actions[bot] commented 2 years ago

[VM/lib] Merge constants and builtin's?

Do we really - really - need another "constant" type? I doubt it whether it makes any serious performance difference, with the only exception being constants like true, false, etc.

But then, it also over-complicates documentation generation for constants.

So, we should either make documentation possible for constants as well, or merge the two things into one concept

https://github.com/arturo-lang/arturo/blob/ce734e7a32c73173910cdf8f533f56be21febe3b/src/vm/lib.nim#L113

            )

# TODO(VM/lib) Merge constants and builtin's?
#  Do we really - really - need another "constant" type? I doubt it whether it makes any serious performance difference, with the only exception being constants like `true`, `false`, etc.
#  But then, it also over-complicates documentation generation for constants.
#  So, we should either make documentation possible for constants as well, or merge the two things into one concept
#  labels: vm, library, enhancement, open discussion
template constant*(n: string, alias: SymbolKind, description: string, v: Value):untyped =
    Syms[n] = (v)
    Syms[n].info = "[" & static (instantiationInfo().filename).replace(".nim") & ":" & $(static (instantiationInfo().line)) & "] " & description
ndex e098b999e..4d261283b 100644
++ b/src/vm/package.nim

07c8d3ba9b413ceb346e0c3ce2d4dcf661f97847

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 1 year ago

Closing issue as stale.

drkameleon commented 1 year ago

Re-opening as still valid

stale[bot] commented 12 months ago

Closing issue as stale.

stale[bot] commented 4 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.