https://issues.dlang.org/show_bug.cgi?id=20172

          Issue ID: 20172
           Summary: using functions with full path and without preliminary
                    import
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nob...@puremagic.com
          Reporter: blac...@bk.ru

sometimes imported functions used in simple context

suggestion: 
add possibility to use imported function in-situ with full path

struct S {
  void freeItem( void* pelem ) 
  {
    // now: u should import before call
    //import core.stdc.stdlib : free; // no needed

    // suggestion: just call
    core.stdc.stdlib.free( pelem );
  }
}

full path modules.func( .. ) tells exactly function that needed with less LOC,
key press and without blurring eyes by 2 separate items: import and invoke

--

Reply via email to