apiaryio / mson-ast

MSON AST Serialization Media Types
MIT License
4 stars 1 forks source link

Resolve value type vs. value confusion #11

Open honzajavorek opened 9 years ago

honzajavorek commented 9 years ago

As I already suggested in this comment, I propose we rename Value Type, because it's confusing. My suggestion is to rename it to Item Type.

...as I dive more into programming, I realize this value vs. value type is really quite a mess. What comes to my mind (and it's also like that in JSON Schema) - couldn't we rename Value Type to Item Type? The word item isn't used anywhere else and in my opinion it unambiguously refers to "array item", "list item", something like that.

I am eager to prepare a PR if we decide this is a good idea.

My experience with current naming is bad and I feel this is important to discuss now, because once MSON is out, it can be too late to change it.

fosrias commented 9 years ago

@honzajavorek The issue will arise with Enums. We actually named this more around the idea of an enum Value Type than the array, per se, but I think from a language perspective, Value Type is more accurate. Been a while since I thought about all this though. @zdne May be able to add more.

honzajavorek commented 9 years ago

I'd like to divide the discussion into two points:

  1. problem: value type vs. values is confusing
  2. my proposal for solution: item type

Enums are very valid point against my proposal. However, I still feel that item types would be a way better than value types for both arrays and enums, because from my POV getting rid of confusion is more important than language purity in this case. But I am open to other proposals to better match actual meanings, if they solve the point number 1.