Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

As if "json" is any more searchable. Operators have a meaning that you learn quickly when learning the language. You wouldn't do math with "multiply" instead of "*", so why would you want that in a programming language?


Multiply already has a symbol, and JSON already has a name. Making up a symbol %* to mean JSON is like making up a name Flurb to mean *. Sticking with what already exists seems much simpler.


Because with a keyword the meaning is much more explicit, and I consider that to be more valuable. And I think "*" is a bad example because pretty much everyone who programs already knows it's multiplication.


It might not be the best example, but the point stands. Succinct notation is important. "JSON" instead of "%*" might not be the greatest of examples but still.


Because there's no point in saving three characters (although I'd rather have it be "literal_json" or "inline_json") just to have people memorize what yet another symbol means in a highly specialized context when you could just read the word and be perfectly certain what the code means without looking it up the first time.

Even after the first time symbols have a non-trivial cognitive cost for a lot of people, if not most, all while providing near zero benefit unless your app is pretty much nothing but a bunch of inline json expansions.


Of course it is. It's descriptive and searchable.

Because * / - + is the common ground that essentially everyone is familiar with. And that's about as much math notation as makes sense in general purpose programming languages.

There is only one math but many programming languages. Multiplication is universal and fundamental. Creating JSON objects in nim is the opposite of that.


> Of course it is. It's descriptive and searchable.

If I entered "nim json" into google I'd get thousands of results for the language and json in general, and no way to narrow it down to meaning the operator "JON". That's not really what searchable means.


> no way to narrow it down to meaning the operator

My google insider tells me you can add the word "operator" to your query to do that. Or any other similar word like "keyword" that anyone else thought to call it on stack overflow.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: