Concept: Native Language Escapes

About Monkey 2 Forums Monkey 2 Development Concept: Native Language Escapes

This topic contains 1 reply, has 2 voices, and was last updated by  codifies 2 years, 4 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #5838

    scurty
    Participant

    I wonder if a type of “native language escape” functionality could be added to Monkey. Similar to C how you can escape from the C language and then you can program in Assembly almost seamlessly. However, since monkey is translated to multiple languages, I figure it wouldn’t be too difficult to tell the translator to ignore all syntax from a certain directive to the specified end, then include the raw code in the appropriate build/target. Explanation by Example:

    For now just keep the identifier scope within the pre-processor directive things.
    Not sure how practical this would be in practice, but I’m sure it would be useful in very special cases.

    Watchya’ll think?

    #5839

    codifies
    Participant

    are you assuming functions that would only return a “native” value type like an int or double etc ?

    as you can import whole C files what would be the difference with this approach ?

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.