I took a look at the example code. You _can_ of course implement stuff
like this in Oz, too.
See http://www.mozart-oz.org/home/doc/mozart-stdlib/os/path.html for a
useful module.
I don't see anything which would require macros there.
If you decide to learn Oz, you should know that Oz is, at its core, a
functional programming language (personal opinion).
To check whether some string in a list matches a regex, you would
typically write:
if {Some ["one" "two" "Three"] {Matches "[A-Z].*"}} then
{Show yes}
end
An excellent book to learn Oz from is:
http://www.info.ucl.ac.be/~pvr/book.html
Why do you plan to remove macros?
I'm not a Mozart developer, just a user. But as far as I know, the macro
implementation is really just experimental and did not meet the ideas
that the language designers had about macros.
Cheers,
Wolfgang
Louis wrote:
if regex in array
do something
if regex not in array
do something
for array1values in array2
delete array1values
if string in array...
Syntactic macros are really powerfull. I thought about
using mozart-oz as generic script language since
it does support single lined coding.
I currently read about 20 languages, and tried 10.
One of them called
boo (http://boo.codehaus.org/ )
I have large codereporsitys and want to backup them,
and implement automatic DRC (darcs, mercurial) backups
and stuff.
Look at this boo code for example:
http://pastebin.com/m23af3b62
While the java one will look something like this
(yes, java has interpreter capabilities,
it's called beanshell or groovy etc.):
http://pastebin.com/mefd3b59
Then there are the more common ones like python and perl.
But I really do not want to talk about them.
I found boo to be currently the best all day language
+ it supports syntactic macros and an impressive compiler
and language extensibility.
You can even script internet explorer and firefox with it.
And it supports full .net and .mono compatibility.
But somehow I think oz could also be a really good
scripting language.
Nice and elegant code, thought.
Why do you plan to remove macros?
Greets Louis Hoefler
-----Ursprüngliche Nachricht-----
Von: [email protected] [mailto:[email protected]] Im
Auftrag von Wolfgang Meyer
Gesendet: Mittwoch, 13. Mai 2009 14:07
An: Mozart users
Betreff: Re: Syntactic Macros
Dear Louis,
Mozart does unfortunately not have macros.
There _is_ an experimental implementation of macros which is documented
here: http://www.mozart-oz.org/documentation/macro/index.html
But it is not part of the language and will probably disappear in future
versions.
However, there might be other ways to do what you want. If you could go
into more detail, we might be able to help you.
Cheers,
Wolfgang
Louis wrote:
Is is possible to use Syntactic Macros with Mozart oz?
I want to implement advanced searches for arrays.
Thanks Louis Hoefler
_________________________________________________________________________________
mozart-users mailing list
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users