Become a fan of Slashdot on Facebook


Forgot your password?
Databases Open Source Programming

Type Safety Coming To DB Queries 128

An anonymous reader writes "A new type-safe query language for the popular full-text search platform Solr, called Slashem (a Rogue-like), has just been released. Slashem is implemented as a domain-specific language in Scala, providing compile time type-safety, allowing you do things like date range queries against date fields but keeping you from trying to do a date range query against a string field. Hopefully this trend catches on, resulting in fewer invalid queries exploding at runtime."
This discussion has been archived. No new comments can be posted.

Type Safety Coming To DB Queries

Comments Filter:
  • LINQ (Score:5, Interesting)

    by bondsbw ( 888959 ) on Sunday September 11, 2011 @06:15PM (#37371284)

    The title is incorrect; type safety is already available in DB queries, at least on Windows clients. You can use LINQ [] directly in C# and VB, or standalone via LINQPad [].

    I'm all for new languages... but IMHO, I think LINQ is better. It looks more like SQL for all of us who already know SQL. It reads in the most logical order for word completion (select is after from/where, not before). And it's very carefully built on top of pure functional structures (SelectMany is equivalent to monadic Bind).

  • Re:LINQ (Score:4, Interesting)

    by shutdown -p now ( 807394 ) on Sunday September 11, 2011 @07:24PM (#37371766) Journal

    The difference between this and LINQ is that LINQ is more or less hardwired. Sure, it is just syntactic sugar for a bunch of method calls, and those methods can do anything they want, so there are many extensibility points; but you cannot add a new LINQ keyword from a C# library, for example - you're stuck with "select", "join", "orderby" etc.

    This one, on the other hand, only uses existing Scala constructs, with no need to alter the language itself.

    But, yeah, I wouldn't call it such a big difference in practice, so it's certainly not a first.

  • by Samantha Wright ( 1324923 ) on Monday September 12, 2011 @12:14AM (#37373400) Homepage Journal

    That's probably because everyone else on the entire internet has already proposed. I think it's bad luck to try the same pickup line twice on the same woman.

    ...while it's flattering, I don't think my girlfriend would be too happy.

Nothing ever becomes real till it is experienced -- even a proverb is no proverb to you till your life has illustrated it. -- John Keats