Skip to content

Converting sophia code 0.6.2 to 0.8 #158

Answered by pchampin
1g0rkR asked this question in Q&A
Discussion options

You must be logged in to vote

Hi folks, I would appreciate for some advises converting code sophia version 0.6.2 to 0.8.

  1. Which type I can use from last version similar to Term v.0.6.2? Is it SimpleTerm, right?

SimpleTerm is probably your best bet, indeed -- its closest equivalent in 0.6.2 was MownTerm.
If you need cheap cloning, you might also want to consider RcTerm or ArcTerm.

  1. What I can use to convert str, String, bool to literal?
    I see, there is a small piece of code g.insert(&jwt, &s_name, &"jwt".as_literal())?;

&str now implements the Term directly, so you can pass it directly, so you can pass "jwt" directly to the insert method, no need for as_literal.
As a consequence, for String, you can also pass the…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by 1g0rkR
Comment options

You must be logged in to vote
1 reply
@pchampin
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants