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

Feature request: Multiple imports #5467

Open
kevinJ045 opened this issue Jul 27, 2024 · 1 comment
Open

Feature request: Multiple imports #5467

kevinJ045 opened this issue Jul 27, 2024 · 1 comment

Comments

@kevinJ045
Copy link

I was thinking about if coffeescript had a way to make multiple imports, like:

import (
   "one"
   "two"
   "three"
   "four"
) as (
   @one
   two
   { three }
);

which could translate to:

import * as one from "one"
import two from "two"
import { three } from "three"
import "four"

You can also:

import (
  "one"
  "two"
)

which will be:

import "one"
import "two"

now i don't know if this is any better than the normal imports, but it removes the duplicate import statements atleast...

@adminy
Copy link

adminy commented Oct 18, 2024

its visually less plesant to look at than the 4 imports tbh. Even though I do agree the pythonic way of imports is more appealing than JS with their:

from module.path import func, cls
import module.path.func as fn

giving you the sense that from that file comes just this small thing.

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

No branches or pull requests

2 participants