emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [NonGNU ELPA] New package: sqlite3


From: Philip Kaludercic
Subject: Re: [NonGNU ELPA] New package: sqlite3
Date: Wed, 22 Mar 2023 08:10:47 +0000

Lynn Winebarger <owinebar@gmail.com> writes:

> On Tue, Mar 21, 2023 at 12:53 PM Philip Kaludercic <philipk@posteo.net> wrote:
>> I really, really have no idea what you are getting at.  As in "ok, but
>> what is your intent in explaining this?".
>>
>> Are you trying to propose that Emacs circumvents the SQLite API (that as
>> far as I see uses strings) by constructing statement objects manually?
>
> Not at all.  I don't think I can communicate via email the power of
> generative programming techniques, and why basing them on simple
> string concatenation is a bad idea, so I'm going to stop trying.

I get that, and I am not advocating for string concatenation.  Perhaps
that is what is confusing me?

> I don't think "? ? table values ( 1.0, 'Foo' )" can be supplied with
> 'insert and 'into as parameters.

Nor do I, but I doubt the necessity.  SQL is a very brittle language,
and replacing one keyword with another will usually require other
changes to be made as well.

>> Are we sure that a database is more efficient than a hash-table (which
>> can already be printed and read)?  Or are we talking about unusually
>> extreme values, like in your other message where you were loading 2000+
>> packages?
>
> Who determines what is extreme?  

Experience and convention?  There is no algorithm to determine this, but
before 2000 the highest number of Emacs packages I heard someone was
using was maybe 300-400 (which I also think is an absurd number).

>                                  Tasks that aren't done today because
> they are difficult to code efficiently?  Tasks that seem extreme when
> you write the code in direct style may become much less extreme once a
> well-crafted table/query facility is available.  I don't think simply
> *installing* 2000+ packages is all that extreme in itself.  Even
> loading all those packages, particularly when using redumping, is not
> particularly extreme in terms of resource consumption on modern
> desktop hardware.
>
> Hash tables only index a single key of a data set.  And they don't
> address tasks like efficiently joining tables.
>
> My personal interests run to using relational programming for problems
> like abstract interpretation and compiler implementation.  

In Elisp?

>                                                            I'm sure
> there are many applications for problems Emacs is used to solve, e.g.
> tracking cross-references, tag tables, etc.
>
>> > I'm sure there's more, but we won't know until the programming idiom
>> > is readily available and easy to use.
>>
>> Are there any other languages that support this kind of interaction,
>> where we could learn some lessons about the advantages and limits of
>> these ideas?
>
> You might consider the LINQ sublanguage of C# and other .NET-based
> languages as an example of a useful query DSL.

As far as I understand (I have no experience with .NET-based languages),
this is only syntax sugar?  Or how does this relate to the point of
dumping an in-memory database.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]