3 ms·
> vaguely-English-like syntax that's completely unlike any other computer language COBOL is also English like. I'm not negative about SQL. I'd rather write qu
by pmontra 7y ago
> vaguely-English-like syntax that's completely unlike any other computer language
COBOL is also English like.
I'm not negative about SQL. I'd rather write queries in SQL than having to learn for the nth time how to write SQL in language X with ORM/module Y. I'm doing it with Django, Rails and Phoenix in the same week since a long time now and it feels a bit pointless. But then there is the deserialization in the data structures of the language. I just wish those libraries would be smarter and know how to handle some hypothetical code like
sql("select * from users").each |user| do
something(user)
end
And be able to handle joins.
- piaste 7y agoThe best experience I know of in this regard is from some packages in ML languages, where the string literal query you write gets sent _at compile time_ to a database engine for parsing, using the database's API to determine the query's expected return type (column names and types). They're most used in F#, which calls them type providers: https://github.com/fsprojects/FSharp.Data.SqlClient https://github.com/fsprojects/FSharp.Data.SqlClient https://hackage.haskell.org/package/postgresql-typed https://hackage.haskell.org/package/postgresql-typed