{'fraction_non_alphanumeric': 0.025906735751295335, 'fraction_numerical': 0.002072538860103627, 'mean_word_length': 5.232258064516129, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Foreign-Function Interfaces for Garbage-Collected Programming Languages

Programs in high-level, garbage-collected programming languages often need to access libraries that are written in other programming languages. A foreign-function interface provides a high-level lan- guage with access to low-level programming languages and negotiates between the inside and the outside world by taking care of the low-level details. In this paper, I provide an overview of what different kinds of foreign-function interfaces are in use in today’s imple- mentations of functional programming languages to help decide on the design of a new foreign-function interface for Scheme 48. I have revised several mechanisms and design ideas and compared them on usability, portability, memory consumption and thread safety. I discuss the garbage-collection related parts of foreign-function interfaces using Scheme as the high-level functional language and C as the external language.