Re: What databases have taught me
Date: 28 Jun 2006 19:49:13 -0700
Message-ID: <1151549353.509921.213280_at_d56g2000cwd.googlegroups.com>
erk wrote:
> Marshall wrote:
> > First of all, while a lot of ink is being consumed discussing ruby and
> > python, please note that virtually all commercial software activity
> > is happening with C++ and Java.
>
> Agreed. I just think the ink may be a harbinger of future trends, and
> would rather the ink were on more worthy languages.
I am sceptical of the ink as a harbinger, though of course only
time will tell. For a few years I maintained a regular database
that recorded weekly the count of Google results for phrases
like "java programming language" and "python programming
language" to see if I could spot any trends, but the results
were uninteresting. If there was one clear result it indicated,
it was that Java was declining in relevance, which has turned
out to be the opposite of true, at least in the last few years
since I stopped.
I note that even back then, the amount of ink that Python
received was comparable to the amount Java or C++ received,
even though, then as now, there are 20:1 more jobs for the
latter compared to the former.
I also note (perhaps recklessly) than no dynamically typed
language has ever achieved any significant marketshare,
and that historically languages trickle down from academia
and research institutions, and not up from the trenches.
These latter points suggest that it might make more sense
to look to Haskell rather than elsewhere, but that does
> > Most statically typed languages, and all popular ones, are
> > nominally typed, not structurally typed. Essentially what this
> > means is that if you have two identical types with different
> > names, are they consider the same type ("structural") or
> > different types ("nominal.") SQL is structurally typed, and
> > furthermore has a product type as its fundamental
> > collection. Most "dynamically typed" languages are structural
> > rather than nominal, and I believe it is that, and not
> > <shudder> "duck" typing, that gives them a good bit of
> > their interest.
>
> I believe that most (if not all) of the ML family of languages uses
> structural typing.
I think that's been a source of their success.
> > I believe a structurally, statically typed language with a
> > product type as its fundamental collection, (along with
> > some relational operators) would be *most* interesting.
>
> I agree completely, though the product type gives you (essentially)
> tuples; the next obvious step would be proper relations as (minimally)
> powersets of these product types. I think that those operations would
> fall out nicely from the product type.
That is actually what I was trying, not particularly successfully, to say.
> Still missing are constraints; however, I have a white paper burning a
> hole in my book bag, related to this very thing. Witness Alloy
> constraints and model elements as annotations on Java code:
> http://cag.lcs.mit.edu/~marinov/publications/KhurshidETAL02AAL.pdf
There is also JML, if you are interested.
http://www.cs.iastate.edu/~leavens/JML/
I found this paper particularly diverting:
ftp://ftp.cs.iastate.edu/pub/leavens/JML/jmldbc.pdf
Example code from the above:
/*_at_ requires a != null _at_ && (\forall int i; _at_ 0 < i && i < a.length; _at_ a[i-1] <= a[i]); _at_*/
int binarySearch(int[] a, int x) {
// ...
}
In other words, binarySearch has preconditions a NOT NULL, and a is sorted. Note the sortedness precondition use universal quantification!
Marshall Received on Thu Jun 29 2006 - 04:49:13 CEST