4 ms·
I agree, though I'll give SQL a pass for this because it's old. But how the Javascript world ever thought that `import { function } from 'library'` was better
by vosper 5y ago
I agree, though I'll give SQL a pass for this because it's old.
But how the Javascript world ever thought that `import { function } from 'library'` was better than `from 'library' import { function }` I'll never know. Python got this right long before anyone was even thinking about adding imports to JS!
- hdjrudni 5y agoYa..that one is particularly sad because it was recent. Don't know why they felt the need to botch that.
- goscript 5y agoI agree but not with current JavaScript modules. i would rather work with this: import { functionA } from 'library'; import { functionB } from '../utils/core/abc'; import { functionC } from './a'; over: from 'library' import { functionA }; from '../utils/core/abc' import { functionB }; from './a' import { functionC };
- Too 5y agoCare to rationalize? Your first example only looks pretty because the function names happens to be aligned while the library names are not. Import a few more functions with different length name and the story will be different. In reality library names tend to align better since they usually start with same prefix spanning across several sub-components.