Very neat language I discovered recently - similar in feel and spirit if
not in every specific to Ruby, and a solution to making Java programming
fun and productive that doesn’t involve embedding an interpreter.
martin
Very neat language I discovered recently - similar in feel and spirit if
not in every specific to Ruby, and a solution to making Java programming
fun and productive that doesn’t involve embedding an interpreter.
martin
Interesting. I think this is the right approach to take when creating a
language (make it easy to integrate with code from an already popular
language). This is exactly how C++ got its start, and I suspect is the
only way to create a successor to either C++ or Java.
One question: what is the purpose of the ‘@’ character in an argument
list, e.g.:
display(p@Person)
{
return p.name + " (age=" + p.age + “)”;
}
And how does it differ from the C-style argument lists:
void main(String[] args)
{
System.out.println(“Hello, world!”);
}
Paul
On Fri, Aug 01, 2003 at 09:50:54PM +0900, Martin DeMello wrote:
Very neat language I discovered recently - similar in feel and spirit if
not in every specific to Ruby, and a solution to making Java programming
fun and productive that doesn’t involve embedding an interpreter.
One question: what is the purpose of the ‘@’ character in an argument
list, e.g.:display(p@Person)
{
return p.name + " (age=" + p.age + “)”;
}
I think it just “declares” p as an instance of Person. So it’s not
really different from the C version.
On Fri, Aug 01, 2003 at 10:18:24PM +0900, Paul Brannan wrote:
And how does it differ from the C-style argument lists:
void main(String[] args)
{
System.out.println(“Hello, world!”);
}
–
Daniel Carrera | PGP: 6643 8C8B 3522 66CB D16C D779 2FDD 7DAC 9AF7 7A88
Math PhD. UMD | http://www.math.umd.edu/~dcarrera/pgp.html
One question: what is the purpose of the '@' character in an argument
list, e.g.:
to specialize the argument (it implement multi-dispatch)
And how does it differ from the C-style argument lists:
apparently functions have a single implementation (no specialization).
Guy Decoux
display§ -> default implementation
display(p@Person) -> p is a Person or one of its subclasses
display(p#Person) -> p is a Person exactly
http://nice.sourceforge.net/manual.html#id2800987
martin
Paul Brannan pbrannan@atdesk.com wrote:
One question: what is the purpose of the ‘@’ character in an argument
list, e.g.:display(p@Person)
{
return p.name + " (age=" + p.age + “)”;
}
Well, a ‘default’ implementation that the multimethod dispatcher falls
through to if none of the specialised rules match.
martin
ts decoux@moulon.inra.fr wrote:
One question: what is the purpose of the ‘@’ character in an argument
list, e.g.:to specialize the argument (it implement multi-dispatch)
And how does it differ from the C-style argument lists:
apparently functions have a single implementation (no specialization).
Well, a 'default' implementation that the multimethod dispatcher falls
through to if none of the specialised rules match.
Apparently he make a difference between function and methods
http://sourceforge.net/mailarchive/forum.php?thread_id=1640098&forum_id=4922
Guy Decoux
Oops, sorry - I misunderstood your last post.
martin
ts decoux@moulon.inra.fr wrote:
Well, a ‘default’ implementation that the multimethod dispatcher falls
through to if none of the specialised rules match.Apparently he make a difference between function and methods
http://sourceforge.net/mailarchive/forum.php?thread_id=1640098&forum_id=4922