Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

enhancement: use package object instead of FullDsl #28

Open
pfn opened this issue Jul 29, 2014 · 3 comments
Open

enhancement: use package object instead of FullDsl #28

pfn opened this issue Jul 29, 2014 · 3 comments

Comments

@pfn
Copy link

pfn commented Jul 29, 2014

I don't think there's a reason to manually import FullDsl._

instead, should a package object be used to just have a single import of macroid._ ?

@pfn
Copy link
Author

pfn commented Jul 29, 2014

Rather, I don't think there's much of a reason to import macroid._ and not FullDsl._ ; sure there's a bit of namespace pollution when doing both, but I don't see when I would want just macroid._ and not the FullDsl as well.

@stanch
Copy link
Collaborator

stanch commented Jul 29, 2014

The way Macroid is structured now is as follows:

  • features are grouped in small private[macroid] traits
  • these traits are mixed into various bigger objects.

Here is an approximate list of objects available: http://macroid.github.io/guide/Imports.html
The idea was to provide granular modularity. For example, it can be desirable not to import Tweaks._, then it’s a simple matter of doing import LayoutDsl._; import Tweaks and using tweaks with a qualifier.

That said, I’m not completely sold on the single import, besides macroid._ is often not needed. What I was considering instead was to reintroduce the cakes as package objects, or lowercase objects, so that:

import macroid._
import macroid.fulldsl._

Anyway, I think this could be easily decided by conducting a poll in the mailing list — thanks for the suggestion!

@stanch
Copy link
Collaborator

stanch commented Jul 29, 2014

stanch added a commit that referenced this issue May 1, 2015
* Tweaking and Snailing are now in `macroid._` and not in the Cakes.
* Implicit conversion to UiFuture is now in `macroid._` as well.
* Moved UiThreading.{runUi,getUi} to Ui.{run,get}.
stanch added a commit that referenced this issue May 1, 2015
* Tweaking and Snailing are now in `macroid._` and not in the Cakes.
* Implicit conversion to UiFuture is now in `macroid._` as well.
* Moved UiThreading.{runUi,getUi} to Ui.{run,get}.
stanch added a commit that referenced this issue Jul 12, 2015
* Tweaking and Snailing are now in `macroid._` and not in the Cakes.
* Implicit conversion to UiFuture is now in `macroid._` as well.
* Moved UiThreading.{runUi,getUi} to Ui.{run,get}.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants