Fat Gerbil prelude #345
Labels
No labels
UX
active development
backlog
blocker
bootstrap
bounty
bug
dependencies
discussion
documentation
duplicate
enhancement
flaky test
help wanted
invalid
javascript
question
release
tendentious
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
mighty-gerbils/gerbil#345
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
So I would like to propose a fat gerbil prelude, named
:gerbil/fatwhich adds basic batteries to the core language.Minimum imports and re-exports:
What else should be in the fat prelude?
Obvious extension:
:gerbil/gambit.I am not sure why this is needed.
Maybe a couple of popular SRFIs or modules from
misc?Here's the head of two dozen or so gerbil repos that I grepped for imports:
I don't see why this can't exist but at the same time I don't actually see a use for it either. Every one of my files has different imports, and I use
only-into minimize imports.Is this wanted to better help new developers learn the language? In a way choosing all your imports means getting to know the stdlib better. I can see
gerbil/fatbe part of the documentation but not the actual stdlib. It could be a tutorial on how to create one's own stdlib package, including some standard imports and user-defined functions.My IRC history is sporadic so I might have missed the discussion that led to this issue being raised. Who needs this for what?
Well the need is for cutting the boilerplate, especially for scripts or interactive code.
For (static) binaries I would very much recommend against fat.
Hi,
I'm just starting to use Gerbil, but when I saw this issue I wanted to chime in: I find really confusing when I read a certain file/module with many non-qualified imports, because it makes much harder to figure out where does a certain function of thingy come from.
I have seen similar patterns of fat modules like the proposed
:gerbil/fatin Python (a bogus proxy module does many imports so that whatever is importing it, gets everything) in some codebases I worked with, and the result in maintainability is just... awful. I'm often okay with reducing boilerplate, but I don't think imports are the target.For what my opinion is worth, I'm with @belmarca: I'm curious as to who benefits from that. In my experience with Python (the language I'm often paid to write code on) it's common practice to import everything (either qualified or specific imports like
only-in) and this doesn't seem to be a problem.