Coder Social home page Coder Social logo

es-modularized's Introduction

Questions

principle (dave)

  • split normal API from reflective.

bucket vs utility functions

import Object from 'object';

// form 1:

import { isPrototypeOf } from 'object';

// form 2:

const { isPrototypeOf } = Object;

form 1:

  • bindings remain unbroken

form 2:

  • bindings diverge

It is possible that both form 1 and form 2 are desirable;

Clustering

module depth:

self categorizing (nice for docs, shows relation of similar species)

array array/float32 array/float64 error error/type error/range

what about array/uint8-clamped vs array/uint8/clamped what about weak-map vs weak/map vs map/weak what about weak-set vs weak/set vs set/weak

top level

array float32-array float64-array error type-error; range-erro

Performance

VMs now have the oppertunity to lazily initializer unused properties on namesapces. For example:

Math.abs // often only incures the penality of initializing `Math.abs`, not the other sibling properties unaccessed

As Modules, we likely must ensure the runtimes maintain this

Safety

Freeze the enviroment

HotSwaping/Patching

important this

Promise.all Promise.resolve Promise.reject all have an important this which means, they are non-functional without an approriate this and as such should not be available as named exports of the promise module.

Rather if someone would like to capture all should prefer importing the promise module and destructuring the all.

example:

import Promise from 'promise';
const { all } = Promise;

some modules are massive buckets, should we break up the helpers functions further?

An example may be Symbols various symbols like search + species (https://people.mozilla.org/~jorendorff/es6-draft.html#table-1) or Math constants

  • Reflect feels strange as a module

  • Math NS has no more meaning in the module world, it would seem like we can either do just a module of named exports, or that + a bucket.

  • Does Math.sin < get its functionality from import { sin } from 'math' ? or are they divergent

  • module API could be seen as a refresh, bugs can be fixed and defaults changed

window.Promise === import Promise from 'promise';
window.Promise = 1, import Promise from 'promise'; // keeps working
Promise.all !=== import { all } from 'promise';

import { defineProperty } from 'reflect/object';

Object.defineProperty !=== defineProperty

it has better defaults, such as { value: enumerable: true, configurable: true, writable: true };

es-modularized's People

Contributors

stefanpenner avatar

Stargazers

Angus H. avatar

Watchers

 avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.