Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UX: Make root easier to import #19

Open
davesmith00000 opened this issue May 25, 2023 · 1 comment
Open

UX: Make root easier to import #19

davesmith00000 opened this issue May 25, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@davesmith00000
Copy link

Hi!

I'm helping someone put together an example of routing a Tyrian app that uses url-dsl to do the path matching heavy lifting. Working well so far!

I'd like to suggest that the on-boarding experience could be simplified by organising packages / imports differently. (In my projects I often do this with package objects full of aliases so that I don't corrupt the real package structure in the name of user friendly-ness.)

For example: My first impression of this import was that the nice person building the routing example we're working on, had got the wrong import. That they'd dived into the implementation and yanked out something internal. 😄

import urldsl.language.simpleErrorImpl._

The Impl suffix to me implies that I shouldn't be importing that thing, the convention (to me?) means that its the internal implementation behind some interface.

In fact, to get our simple example working, I have to import all of this (it seems?):

import urldsl.errors.*
import urldsl.language.*
import urldsl.language.simpleErrorImpl.*
import urldsl.vocabulary.*

If the imports (with aliases) could be arranged so that I can import everything I need for simple routing with one import, I think that would be a good usability improvement, something like:

import urldsl.syntax.*

Just a suggestion, feel free to close the issue if you disagree.

@sherpal sherpal added the enhancement New feature or request label May 25, 2023
@sherpal
Copy link
Owner

sherpal commented May 27, 2023

Hello,

Thank you for reporting this. Reducing getting started friction is obviously something I can't ignore!

I think you are right that we too often end up having too many lines of imports, and in particular the most important one is probably the most difficult to find...

Putting everything that's needed in a single import is a good idea, I will try to implement that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants