6,755 karma · joined August 18, 2008
I'm not a believer in the FP vs. OO religion, and have historically been skeptical of the bind operator. That said, I think that both composition via objects and composition via functions have their place.
The pipeline operator attempts to make composition via functions more readable (left-to-right instead of right-to-left) and unless you think composition via functions is a bad idea in JS in all cases, I'm not sure what "full-on functional" has to do with it.
The main counterargument to "do it like underscore" is that underscore still ends up being an object whose methods are added to a prototype, not imported.
The benefit of the "pipeline" or "bind" approach is that you get left-to-right composition while still importing the names you're using.
The main goal of all of these proposals is "left to right" composition when working with functions, and functions take parameters.
import { sortBy, filter, map } from 'array-like';
let names = document.querySelectorAll('.entry')
-> sortBy('title')
-> filter(entry => entry.getAttribute('data-url') in whitelist)
-> map(entry => entry.getAttribute('name');
I personally find this more readable than either the bind proposal (which looks too much like a property access, and not enough like a function call, to me) and the proposed pipeline operator, which doesn't have an immediate meaning to my eyes.That said, the reason it wasn't included in the original elision RFC (https://github.com/rust-lang/rfcs/pull/141) is that the design space here is a little bit more subtle than some of the cases that did make it.
In particular, I believe that it's important to know that a particular struct contains a borrowed value somewhere.
So let's say you could leave off the `'c` on the Sheep struct, and I wrote a struct containing `Sheep`:
struct Flock {
sheep: Vec<Sheep>
}
Now, we have visually lost the fact that a borrowed value is stored inside the flock. Since data structures can get very recursive, this rapidly causes useful information about ownership to get lost.What I'd like to see personally is:
struct Sheep<&> {
age: &i32
}
struct Flock<&> {
sheep: Vec<Sheep>
}
What this would mean is that you can always see, by looking at a struct definition, whether it contains borrowed values (anywhere recursively), but without the grotty need to define and wire up lifetime names.I like the fact that this maintains the strong mental notion of ownership (the meaning of the & "operator" in Rust), but, as with normal elision, it eliminates the wiring that a good compiler should be able to do for you.
The issue, interestingly, is that there are a lot of women (or biased-against group) between the median performance and 160% performance who are being rejected.
In other words, only the best women can get accepted, which means that above-median (but not superstars) are getting rejected, while many more above-median men are getting accepted.
This has the ring of truth to me (as pg says, it's the definition of bias).
Can this be true?
Ruby eventually added `prepend`, which I demonstrated upthread, and is a genuinely generic, in-language solution to the problem you're talking about.
SEO-only FastBoot shipped in canary a while ago (as the `ember-application-visit` feature). It is designed to work with the FastBoot addon (https://github.com/tildeio/ember-cli-fastboot).
Rehydration, the big enchilada, depends heavily on the Glimmer work, and should begin momentarily.
> There was no mention of the deprecating changes to the initializer API (i.e. the splitting into instanceInitializer and vanilla initializer). Have we gone back to the old initializer API in 2.0?
We're sticking with the split-apart API we shipped a few releases ago. It's important to make FastBoot efficient with real-world addons.
> With the removal of action bubbling, do we now have to manually bubble up actions that start in some nested controller but gets handled in application route? For example, say you have an AdminUserController and it has an action that generates an ephemeral flash message, but you handle flash rendering in your application route. Do you now have to laboriously put an actions: { handleFlash { ... } } on every route along the way?
We're starting with more laborious (with services as an escape valve), but have some ideas for conventional situations where you could get away with less ceremony. Stay tuned! (by which I mean, there will be RFCs in the near future addressing this kind of issue).
Between the elimination of controllers (and therefore singleton controllers), and a reshaping of the `model` hook around a simpler "attributes for the top-level" concept we have coming, I am hopeful that most of these gotchas will be a thing of the past for anyone starting out in the Ember 2.x era.
We love seeing thoughtful, detailed lists like this, as they help to drive our priorities for improvements. Ember community: keep them coming!
I've had this happen to me a handful of times in my career, and the H1B program was genuinely helpful there. Unfortunately, it is more often used to save money in situations like this article, making the program less useful for more legitimate situations.
The H1B program disallows hiring foreign workers and paying them less than the equivalent rate for US workers. While there may be some debate about whether tech companies find ways to skirt the law, "we are laying off US workers to save money and replacing them with H1B workers" seems to flagrantly violate the law. No?
That is an explicit non-goal of JSX, and it shows.
It sucks that new Ember CLI apps trigger the deprecation. We should get that fixed :)
The TLDR is:
* We like templates, and were able to implement a more efficient algorithm using them (even more than the recent improvements in Babel).
* Compatibility is important to us, so HTMLBars was going to be a much better transition story for Ember 1.x than JSX.
* We prefer an HTML-centric templating story (copy/paste valid HTML and it works) over an XML strategy that requires camelCasing, className/htmlFor, etc.
* We optimized Glimmer for a hybrid (rerender + subscriptions to the model or service layer) model that can opportunistically avoid work based on knowledge we have from the whole stack.
As you know, React describes itself as the V in MVC; in contrast, Ember is a complete front-end stack, including not only a model and service layer, but also a built-in router, integrated command-line tools, and an add-on ecosystem that takes advantage of that common set of assumptions.
It's also safe to say that the React community is still exploring the space of the application layer: multiple flavors of the original Flux architecture, Facebook's recent announcement of a successor (Relay), and different routing libraries that work well with React.
We believe that there are productivity benefits to having the community coalesce around a single stack, but we also believe that it's important to avoid stagnation. That's why Ember 2.0 is both focused on bringing in some of the great ideas that React has pioneered in the view layer, but maintains many other aspects of the 1.0 stack.
We make the changes compatibly on the 1.x branch with a clear transition plan so that we can bring along as many existing users as possible.
That said, I think it's important for people to understand that many of the problems that people have canonically associated with the web's incompetence have been "solved" in standards for a number of years. There's a real difference between problems that remain unsolved in all browsers and problems that do not remain in the current versions of all browsers.
That difference may seem moot until the features are universally rolled out, but understanding that a solution to centering content rolled out in all major browsers (including Internet Explorer) three years ago may help us get past a sense of learned helplessness about the web.
Yes, improving the platform takes time, but by making browser vendors aware of the problems we face as web developers, things do get better.
Most of the trouble in building a JSON API comes not from deciding on the format, but in nailing down the precise requests and responses that handle common kinds of interactions. This became very clear to me as I worked on Ember Data.
Consider the case of a blog. Each blog post has many comments. Each post has an author, and each comment has an author. Some of those entities may have dedicated URLs, and others may not. Additionally, the authors are highly repetitive; you want to refer to them by identifier, not by embedding them.
Because a tree of data can be represented easily as a graph, but not vice versa, JSON API provides a straight-forward way to provide a list of records that are linked to each other. The goal is simple, straight-forward processing regardless of the shape of the graph.
For example, RC2 mandated that all fields were dasherized. We made field names opaque in RC3.
At this point, we're pretty much nailing down tiny details and included this language with RC3:
JSON API is at a third release candidate state. This means
that it is not yet stable, however, libraries intended to
work with 1.0 should implement this version of the
specification. We may make very small tweaks, but
everything is basically in place.For what it's worth, the issues you linked to are mostly about adding more rigor to possibly underspecified areas, not changing things that are already specified, but those things could easily be done after 1.0.