Closed jonathanong closed 10 years ago
tj had a good argument for json
if i remember correctly. or at least i remember bringing up data
and being converted by the end of the thred to prefer json
. probably something about data
being too meaningless
locals
one i +1, but probably just with backwards compat for a while
i don't think json
is bad. i just feel like people are going to ask for every other type of data storage afterwards. i care way more about locals
though since i always type local
and end up confused when things don't work.
@ianstormtaylor here's the thread component/component#421 :grin:
locals
has messed with me too, +1 for that haha, we can alias for a long time, not worth the pain of making everyone upgrade, but just spec locals
. I always read like "deps local to your app" so it didn't seem weird at first but yeah haha... fail
When it comes to json
and data
, I think data
will be more consistent with the end-goal of reaching out to other platforms.
Ruby devs use more YAML (right?) and .NET devs use XML config, and Java has their own config format. (INI-ish?) The point is that data
would allow us to use a simple file extension in order to process accordingly, regardless of the dev env.
That being said, components will still end up being largely JS in nature, so JSON still makes sense if we wanted to only support that. Unless, of course, we start transpiling other formats into JSON for publish/deployment.
totally agree. we can worry about that when the time comes, though.
fwiw, +1 on locals
as well
yeah already changed that in the spec
do we want to rename stuff?
json
->data
local
->locals
it'll just make upgrading a little harder, but we should have a
component doctor
command to help with upgrading. i think it's worth it long-term.