Peter Van Roy wrote:
> The syntax X,Y for object application is indeed a bit strange.
> It is a funny use of comma, which in most languages is an
> argument separator.
>
> People with habits from other languages (like Prolog, whose
> tuples have commas) often make this mistake at first. Even
> now, I sometimes write lists like [1,2,3] when I'm in a hurry.
>
This is indeed a nicer a example! I should have used this one to be more
convincing :-)
declare
class A
meth foo
_=[1,2,3]
end
end
%************************* expansion error **********************
%**
%** message of nested object application must contain exactly one nesting marker
%**
%** in file "/usr/staff/luque/Oz/demo_planning/FD/tmp.oz", line 4, column 10
%************************* expansion error **********************
%**
%** message of nested object application must contain exactly one nesting marker
%**
%** in file "/usr/staff/luque/Oz/demo_planning/FD/tmp.oz", line 4, column 12
%** ------------------ rejected (2 errors)
Certainly, [1,2,3] is more likely to be a list than an expression
defined in terms of nested object applications!
Luis
-- Catholic University of Louvain Department of Computing Science and Engineering Place Sainte Barbe, 2 B-1348 Louvain-la-Neuve, Belgium Phone: (++32) (10) 47 90 13 Fax: (++32) (10) 45 03 45 Web: http://www.info.ucl.ac.be/~luque- Please send submissions to hackers@mozart-oz.org and administriva mail to hackers-request@mozart-oz.org. The Mozart Oz web site is at http://www.mozart-oz.org/.