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

Grammar + undefined behavior. It’s like saying ANSI C is a specification. It looks like a specification and quacks like a specification but compare it to a quality specification and you are looking into that void Badiou warned you about.

This is what a specification for a query language should look like

https://www.w3.org/TR/sparql11-query/

It is a little terse and not the easiest read but everything you need to know to write SPARQL or implement a SPARQL engine is in there. It's short.

(Now I would say that SPARQL needs to extend the algebra to deal with ordered collections, but that's what is nice about SPARQL being so well specified. If somebody wants to add a feature to SPARQL it is completely straightforward to amend the algebra AND the grammar, often you don't have to mess with the grammar and the use of namespaces means anybody can add anything.)

The GraphQL 'spec' on the other hand is like the singularity of a black hole... It's a place where computer science breaks down.



It's more than that though. Have you read it? It defines execution behavior (execution and validation algorithms, response shape, etc) and not only the grammar. We can argue about the quality of it all day but it is not just a grammar.


It's still not complete.

Think of what the Common LISP, Java, or Python specs would be if you deleted all of the specification of the semantics. The horror of it is that people would make languages that look like Common LISP, Java, or Python but they wouldn't interoperate and when you zoomed in on the details they'd all behave in nonsensical ways because, with no guidance to correct semantics, people will make up wrong things.

We live in an age when we are informed by good specifications. ALGOL and PL/I had hopelessly flawed specifications that weren't really implementable... There were lawsuits over COBOL specifications... But Common Lisp and Java were two early languages developed by adults.

In 2022 we should be at least up to a 1984 standard for writing standards.


This raises the question, is there a standard that describes how programming and query language standards should be written?




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

Search: