  Insertion-deletion codes (insdel codes for short) are used for correcting
synchronization errors in communications, and in other many interesting fields
such as DNA storage, date analysis, race-track memory error correction and
language processing, and have recently gained a lot of attention. To determine
the insdel distances of linear codes is a very challenging problem. The
half-Singleton bound on the insdel distances of linear codes due to
Cheng-Guruswami-Haeupler-Li is a basic upper bound on the insertion-deletion
error-correcting capabilities of linear codes. On the other hand the natural
direct upper bound $d_I(\mathcal C) \leq 2d_H(\mathcal C)$ is valid for any
insdel code. In this paper, for a linear insdel code $\mathcal C$ we propose a
strict half-Singleton upper bound $d_I(\mathcal C) \leq 2(n-2k+1)$ if $\mathcal
C$ does not contain the codeword with all 1s, and a stronger direct upper bound
$d_I(\mathcal C) \leq 2(d_H(\mathcal C)-t)$ under a weak condition, where
$t\geq 1$ is a positive integer determined by the generator matrix. We also
give optimal linear insdel codes attaining our strict half-Singleton bound and
direct upper bound, and show that the code length of optimal binary linear
insdel codes with respect to the (strict) half-Singleton bound is about twice
the dimension. Interestingly explicit optimal linear insdel codes attaining the
(strict) half-Singleton bound, with the code length being independent of the
finite field size, are given.
