Is there any way to make the Lua
I'm currently using comments to emulate the Ada syntax, e.g.:
The Ada equivalent is:
It looks like the Lua syntax was very much inspired by Ada. Hence, I don't understand why they didn't copy the
end
syntax more similar to Ada's end
syntax? e.g.: end if
, end loop
, end Function_Name
I'm currently using comments to emulate the Ada syntax, e.g.:
Lua:
function Get_Max (A, B)
if (A > B) then
return A;
else
return B;
end -- if
end -- Get_Max
print (Get_Max (3, 2))
The Ada equivalent is:
Ada:
with Ada.Text_IO; use Ada.Text_IO;
procedure Main
is
function Get_Max (A, B : Integer) return Integer
is
begin
if A > B then
return A;
else
return B;
end if;
end Get_Max;
begin
Put_Line (Integer'Image (Get_Max (3, 2)));
end Main;
It looks like the Lua syntax was very much inspired by Ada. Hence, I don't understand why they didn't copy the
end
syntax as well? It makes the code much more readable.