lua-users home
lua-l archive

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


2014-03-25 21:33 GMT+02:00 Dirk Laurie <dirk.laurie@gmail.com>:

> $ perl
> print(-1>>1)
> 9223372036854775807
> $ lua53
> Lua 5.3.0 (work2)  Copyright (C) 1994-2014 Lua.org, PUC-Rio
>> print(-1>>1)
> 9223372036854775807

Free Pascal:
~~~ file xxx.pas
begin writeln(-1>>1) end.
~~~
$ fpc xxx
Free Pascal Compiler version 2.4.4-3.1 [2012/01/04] for i386
Copyright (c) 1993-2010 by Florian Klaempfl
Target OS: Linux for i386
Compiling xxx.pas
Linking xxx
/usr/bin/ld: warning: link.res contains output sections; did you forget -T?
1 lines compiled, 0.1 sec
$ ./xxx
9223372036854775807

The argument becomes "Having an algorithm that needs changed
for Lua, Perl and Free Pascal and those languages alone is the
violation of the principle of least surprise". Not quite so convincing
any more, especially as quite a few langages have not been
tested yet by either party to the debate.