Re:JsonLogic
by valenterry on Thursday May 27, 2021 @11:00PM
(#27311271)
I think there are very good reasons why languages have their own custom formats and none of them ever decided to serialize into json, even when just "generating it".
Re:JsonLogic
by dragonwriter on Friday May 28, 2021 @09:44AM
(#27315232)
> I think there are very good reasons
But what reasons and are they relevant to this use? For instance, I can think of one really good reason (actually several different ones justifying different formats getting used depending on the actual use case, but they can all be summarized the same way when it comes to not using JSON): Shipping an AST between endpoints one of which is a web page and therefore has JSON as its best supported generic object serialization format isn’t the use case.
No I don't think there is a good reason. You're completely missing that programming language syntax is designed for humans. You can still serialize all languages to json syntax trees, just like you can do so with lisp notation, Polish notation etc.
Re:JsonLogic
by valenterry on Friday May 28, 2021 @03:50AM
(#27312764)
I'm not saying that you _cannot_ do it. But tell me: why has no programming-language done that? They all could have chosen to serialize their code or AST into json but they didn't. (except JsonLogic I guess)
People did do it (JsonLogic by your own admission) and similar things (every single Lisp based language every) so if your only argument is "people didn't do it before, therefore it cannot be a good idea" it doesn't work.
Because someone didn't have the time to do it? Or they didn't think of it? Just because nobody has had success at an idea, doesnt mean that the idea can't work.
Or do you think we are at our peak?
Re:JsonLogic
by valenterry on Monday May 31, 2021 @02:49AM
(#27341000)
I mean, you are not wrong. But I think the chance for all these people just missing out or not having the idea seems quite low to me.
> all these people just missing out or not having the idea seems quite low to me.
You mean like every single idea/project/etc that ever existed before their invention?
Unfortunately, it has taken me 40 years to learn that most people have no clue about innovation. I mean, imagine believing there are no good ideas left, all the good songs have been written.
From now on, when someone tells me something is a bad idea, I'll take it mean that I should examine it further.
I don't see why serializing close to JSON is any worse than doin so to, say, S-expressions, or Algol-style syntax, or WASM.
If you aren't manually coding it, but generating it, the capabilities matter, the syntax matters a lot less.