Linking languages

后端 未结 9 1370
野趣味
野趣味 2020-12-31 06:16

I asked a question earlier about which language to use for an AI prototype. The consensus seemed to be that if I want it to be fast, I need to use a language like Java or C+

9条回答
  •  滥情空心
    2020-12-31 06:45

    It may be a good approach to start with a script, and call a compilation-based language from that script only for more advanced needs.

    For instance, calling java from ruby script works quite well.

    require "java"
    # The next line exposes Java's String as JString
    include_class("java.lang.String") { |pkg, name| "J" + name }
    s = JString.new("f")
    

提交回复
热议问题