[mercury-users] mercury website (was Suggestion: new operator)
Mattias Waldau
mattias.waldau at abc.se
Fri Oct 20 18:50:42 AEDT 2000
why invent a new operator not found in any other language? is this to try to
make the language as obscure as possible?
the only standard is [ ],
> Map @ Key <=> map__lookup(Map, Key)
> String @ Idx <=> string__unsafe_index(String, Idx)
> Array @ Idx <=> array__lookup(Array, Idx)
should be
Map[Key]
String[Idx]
Array[Idx]
If we cannot use brackets, we should use functions and predicates.
/mattias
-----Original Message-----
From: owner-mercury-users at cs.mu.OZ.AU
[mailto:owner-mercury-users at cs.mu.OZ.AU]On Behalf Of William Lee Irwin
III
Sent: Friday, October 20, 2000 2:11 AM
To: Mercury Users Mailing List (E-mail)
Subject: [mercury-users] mercury website (was Suggestion: new operator)
On Thu, Oct 19, 2000 at 03:33:12AM -0700, Ralph Becket wrote:
> We now have a selection of infix operators for common tasks (`^' for
> field access, `++' for concatenation etc.) I propose adding `@' as a
> synonym for `lookup' operations:
I didn't know this... am I working with the current release?
What I have now is the Debian package mercury 0.9.1-wli1 which is
just 0.9.1 with all of the extra libraries built. I'm apparently
having a very tough time reaching www.cs.mu.oz.au for whatever
reason; is there a U.S. mirror of the Mercury project's page?
(Or, more importantly, is there a U.S. mirror of the Mercury
project's CVS repository with anonymous access?)
On Thu, Oct 19, 2000 at 03:33:12AM -0700, Ralph Becket wrote:
> Map @ Key <=> map__lookup(Map, Key)
> String @ Idx <=> string__unsafe_index(String, Idx)
> Array @ Idx <=> array__lookup(Array, Idx)
> etc.
> Conceivably one could also overload `:=' to handle `set' operations...
> Good idea? Bad idea?
This sounds like a great idea. I can't wait to get my hands on the
revised library when all that is done.
Thanks,
Bill
--
"Doubtless every reader has heard something of the ingenious
theory of monads --- miniature replicas of the universe out of
which everything in the universe is composed, as a sort of one in
all, all in one --- by which Leibniz explained everything (except
the monads) in this world and the next."
-- E.T.Bell in "Men of Mathematics", pg. 128.
--------------------------------------------------------------------------
mercury-users mailing list
post: mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
--------------------------------------------------------------------------
mercury-users mailing list
post: mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the users
mailing list