User loginNavigation |
Means to Limit or Constrain Side EffectsSimple scenario: I'd like to implement a "copy-string" or "substring" style routine 1) in a language where strings are typically functional; 2) without leaving all such routines to the RTL in another language; 3) without depending on some other inefficient (for these purposes) other RTL functional primitive like "strcat"; or 4) without always relying on using lists as intermediaries for every such low level routine ala "list->string (string->list s)" which again likely relies on non-functional RTL level routines anyway. Same would go for various array initialization routines, supporting constructors for (otherwise functional) Smalltalk style variable sized data structures, and on and on. So I seek papers, sample languages and wisdom on potentially clean language mechanisms and their semantics for allowing side effects, say during string/vector initialization as above or in some other possible scenarios (memoization? dunno), without totally letting the non-functional cat out of the bag, as it were. My interest in this issue is pragmatic (implementing an efficient stdlib/rtl while minimizing code written in a different "lower level" language that would not likely share important properties of the target language) as well as intellectual. Thanks much! Scott! By scottmcl at 2010-05-13 01:31 | LtU Forum | previous forum topic | next forum topic | other blogs | 6100 reads
|
Browse archives
Active forum topics |
Recent comments
22 weeks 6 days ago
22 weeks 6 days ago
22 weeks 6 days ago
45 weeks 19 hours ago
49 weeks 2 days ago
50 weeks 6 days ago
50 weeks 6 days ago
1 year 1 week ago
1 year 6 weeks ago
1 year 6 weeks ago