Question: uses function with the Physics package

When I apply the uses function with the Physics package in a procedure, the commands in this package are not restricted to the inside of the procedure, but are applied globally. See the example below:

gds := proc(LL, qi, t)

 local ta,i;  

uses Physics;

ta := sec(diff(diff(LL, diff(qi[i](t), t)), t), i = 1 .. nops(qi));

RETURN(ta) end:

sxy := diff(x(t), t)^2 + diff(y(t), t)^2:

gds(sxy, [x, y], t);

Error, (in Physics:-diff) name expected for external function
 

On the other hand, when I apply the uses function with the LinearAlgebra package in a procedure, the commands in this package are restricted to the inside of the procedure only.
dst:=proc(MM) 

local DA; 

uses LinearAlgebra;

DA:=Determinant(MM); 

RETURN(DA) end:

dst(<<1 | 2>, <3 | 4>>);

                  -2

Determinant(<<1 | 2>, <3 | 4>>);

                         Determinant(Matrix(2, 2, [[1, 2], [3, 4]]))

This could be a bug in Maple 2019?

Please Wait...