Re: [stack] A bit more about Catenate
Don Groves <[email protected]>
| Newsgroups | gmane.comp.lang.concatenative |
|---|---|
| Message-ID | <[email protected]> |
Hi Daniel, Yes, Catenate will require more copying than non-linear languages but the benefits of linearity outweigh the extra copying in my opinion. I haven't considered the idea of two functions wanting to index the same array but that doesn't sound like something I'd need to do anyway, at least it's never come up for me before ;-) There still may be serious problems I haven't foreseen with my approach, I'm no expert in all this and there's a lot of learning as I go along. Kinda what makes it so much fun! -- Don Groves On Aug 16, 2007, at 19:45 , Daniel Ehrenberg wrote: > I'm not sure if I understand your no-garbage-collection idea properly. > How do you plan to make useful compound data structures when two > things cannot point to the same object in memory? It sounds like there > would be a lot of copying involved. If two functions want to index the > same array, will they each need a copy of that array? What about for > more complicated things, like binary trees; won't balancing require > more copying than is necessary in other languages? > > Daniel Ehrenberg > > On 8/16/07, Don Groves <[email protected]> wrote: >> A few more Catenate features: >> >> Dynamic typing: >> Data is typed; names are not. A name can hold any type of data. >> >> Linearity: >> Every memory cell has exactly one reference. When de-referenced, a >> cell is cleared and is immediately available for re-allocation. Thus, >> garbage collection is trivial (marking without sweeping ;-) >> >> Unicode: >> UTF8 encoding is used throughout. >> >> Syntax: >> Probably best described as a math-inspired, Lispish Joy. For example, >> here is a sample terminal session: >> >> stack: { } >> => 3 >> >> stack: {3} >> => 4 * >> >> stack: {12} >> => _ >> >> And a more complex one calculating the area of a circle of radius 3: >> >> stack: { } >> => 3.1459 defcon π >> >> π defined >> >> stack: { } >> => [dup *] defun ^2 >> >> ^2 defined >> >> stack: { } >> => [^2 π *] defun πr^2 >> >> πr^2 defined >> >> stack: { } >> => 3 πr^2 >> >> stack: {28.3131 } >> => _ >> >> Questions, comments, and suggestions will be gladly received, >> Don Groves >> >> >> >> >> Yahoo! Groups Links >> >> >> >> > > > > Yahoo! Groups Links > > > Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/concatenative/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/concatenative/join (Yahoo! ID required) <*> To change settings via email: mailto:[email protected] mailto:[email protected] <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/