You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Guppy is very powerful for writing mixed python and guppy code in one fail and having them interact. But when you are primarily writing guppy (for example when defining guppy modules) there is a lot of boiler plate required.
This includes:
-@guppy decorators everywhere
python imports as well as guppy.load calls for pulling in guppy modules
python imports for guppy builtins like py, owned, result
For these cases it could be quite useful to have a guppy file type which assumes all of this boilerplate. This becomes much easier to pull off once we have an LSP: #714
So let's say you want to define a module in my_guppy_lib.py right now:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Guppy is very powerful for writing mixed python and guppy code in one fail and having them interact. But when you are primarily writing guppy (for example when defining guppy modules) there is a lot of boiler plate required.
This includes:
-
@guppy
decorators everywhereguppy.load
calls for pulling in guppy modulespy, owned, result
For these cases it could be quite useful to have a guppy file type which assumes all of this boilerplate. This becomes much easier to pull off once we have an LSP: #714
So let's say you want to define a module in
my_guppy_lib.py
right now:I propose instead the use can write a
my_guppy_lib.gpy
file like:A difficulty is how this interacts with normal Python files. Python will ignore non
.py
extensions, so maybe users have to call special imports:but the same package discovery rules could apply.
The LSP would also need to understand these imports to go find definitions in other modules.
This would be a key part of the design to improve!
Beta Was this translation helpful? Give feedback.
All reactions