jashkenas / jashkenas/coffeescript

Feature request: Multiple imports

Open
#5,467 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
CoffeeScript
Stars
16.6k
Forks
2k
PR merge metrics
No merged PRs in 30d

Description

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...

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the proposed CoffeeScript multiple-import syntax and its example translations. No files, tests, or entry points are named; determine the parser and compiler areas involved, then define how support would be validated for both grouped imports with aliases and grouped side-effect imports.

Written by the indexing model from the issue text.

Assessment

Tech stack
coffeescript
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.