Match Specifications

Sean Hinde <>
Wed Oct 24 19:50:43 CEST 2001


> A prettier, more Erlang like syntax would be very welcome, 
> and open up Match
> Specifications to less experienced programmers. I am unsure 
> if parts of it can
> be handled in the pre-processor, however, as just like 
> records, it would not be
> possible to use them from the shell.

Yes, I just played with the parse transform stuff and it seems you have to
have erlang syntax already. I guess all the weird mnemosyne stuff is handled
by the main parser before it gets to parse transform.

I guess it'd be possible to do something like:

match_spec:make("fun('$1') when is_integer('$1') -> '$$' end.").
[{'$1', [{is_integer, '$1'}], ['$$']}]

but I agree it's nowhere near as nice as something really builtin.

Sean



NOTICE AND DISCLAIMER:
This email (including attachments) is confidential.  If you have received
this email in error please notify the sender immediately and delete this
email from your system without copying or disseminating it or placing any
reliance upon its contents.  We cannot accept liability for any breaches of
confidence arising through use of email.  Any opinions expressed in this
email (including attachments) are those of the author and do not necessarily
reflect our opinions.  We will not accept responsibility for any commitments
made by our employees outside the scope of our business.  We do not warrant
the accuracy or completeness of such information.





More information about the erlang-questions mailing list