zlacker

[parent] [thread] 3 comments
1. minima+(OP)[view] [source] 2007-07-06 22:48:28
Ah that makes sense! Hope you don't mind but is there any ideas for a loop/iterate/series type macro in the works?
replies(1): >>pg+y1
2. pg+y1[view] [source] 2007-07-07 16:17:01
>>minima+(OP)
Arc has a bunch of iteration constructs. It's iteration-friendly. Most previous Lisps have been ambivalent about iteration, because their designers didn't like side effects.

The usual Lisp do macro, for example. What a wretched bit of language design. Even now, whenever I encounter one, I have to stop and translate it in my head. Plus it can be very verbose. The reason do is so bad is that whoever designed it wanted to make it as functional (in the no-side effect sense) as possible. But sometimes side effects are just the right model.

BTW, there is a do in Arc. It's the new name for what used to be called progn. (It's surprising how much better that little change makes code look.)

replies(1): >>sketer+Z1
◧◩
3. sketer+Z1[view] [source] [discussion] 2007-07-07 20:36:38
>>pg+y1
Does Arc have an API for iterating across general types of data structures? The classic example is lists and arrays; in Common Lisp, supporting both can be a hassle and the language itself seems ad hoc when the issue arises. MAP supports both, but MAPCAR doesn't; the LOOP macro has seperate "IN" and "ACROSS" syntax, and no (standard) way to extend this to user-defined data types.
replies(1): >>pg+b2
◧◩◪
4. pg+b2[view] [source] [discussion] 2007-07-07 22:14:01
>>sketer+Z1
This sort of thing works much more cleanly in Arc.
[go to top]