I've been struggling with this issue for most of my professional life.

Going into the internal demo version of what eventually became PDP-11 
Datatrieve, I required semi-colons as terminators.  My technical writer 
told me that that sucked, I was free to leave it that way, but the 
documentation was going to say that semi-colons were optional.  I had to 
admit, grudgingly, that she had a point.

The Datatrieves (and QLI) parsed (without generating a syntax tree) 
input lines looking for complete statements, otherwise changed to a 
continuation prompt for more input.  Everyone seemed happy with that.

ISQL was more or less a development testbed for dynamic SQL.  I never 
expected anyone to use it for anything significant, so I didn't bother 
putting in command completion recognition.  If I had been more 
prescient, I would have have.

In the NuoDB command line interaction tool I made command completion 
recognition settable, which I think is about right. Switching 
terminators is nightmare, though the scripts in the test system used 
them.  Ugh.

AmorphousDB, at least at this point, has command completion recognition 
only.  I made things easy with a clean and simple parser that 
understands command scanning.

My experience is that for human interaction, recognition of complete 
statements is absolutely necessary.  A crud hack like using a trailing 
semi-colon to indicate command completion just doesn't cut it.  
Scripting tools, likewise.  An API, however, needs to be more rigorous.

The parsing cost is a red herring.  The half dozen microseconds to check 
for command completion isn't worth worrying about.

On 10/15/2015 11:34 AM, Ann Harrison wrote:
>> On Oct 15, 2015, at 9:59 AM, Dimitry Sibiryakov <s...@ibphoenix.com> wrote:
>>
>> 15.10.2015 15:51, marius adrian popa wrote:
>>> In InterBase 7 is changed so procedure and trigger programming language to 
>>> no longer
>>> require the use of SET TERM
>>    IMHO, this is unnecessary complication of isql's parser. I'd prefer to 
>> follow KISS concept.
> Respectfully disagree.  Yes, it complicates isql, but it makes the user's 
> life easier.   One bit of complication in isql, thousands of simpler to 
> create triggers and procedures.
>
> Cheers,
>
> Ann
> ------------------------------------------------------------------------------
> Firebird-Devel mailing list, web interface at 
> https://lists.sourceforge.net/lists/listinfo/firebird-devel


------------------------------------------------------------------------------
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to