Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 623427
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T19:05:30+00:00 2026-05-13T19:05:30+00:00

Which is the corresponding Thrift type for: an Erlang tuple (I can imagine it’s

  • 0

Which is the corresponding Thrift type for:

  • an Erlang tuple (I can imagine it’s a struct)
  • an Erlang atom (if any?)

Is there any documentation available with the direct mappings between the Erlang types and the Thrift IDL types?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T19:05:31+00:00Added an answer on May 13, 2026 at 7:05 pm

    Well, I’ll try to answer myself 🙂

    Apparently there is no direct translation of Erlang tuples in Thrift. What you can do is to include in your Erlang module the type definitions generated by Thrift and to write your Erlang code so that it uses the generated Erlang records as parameters and/or return values for your functions.

    Erlang atoms must be translated into Thrift binaries (or eventually strings).

    So, if you would like to have something like:

    -spec cool_function() ->
      {atom(), atom()}.
    cool_function() ->
      {foo, bar}
    

    You will need to specify in your whatever.thrift file:

    struct MyTuple {
      1: binary first,
      2: binary second
    }
    
    service myService {
      MyTuple cool_function()
    }
    

    Plus, you need to write your Erlang function as:

    [...]
    
    -include("whatever_types.hrl").
    
    [...]
    
    -spec cool_function() ->
      #myTuple{}.
    cool_function() ->
      #myTuple{
        first = atom_to_binary(foo, utf8),
        second = atom_to_binary(bar, utf8)
      }.
    

    Please, correct me if I’m wrong.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

any idea which is the command for publish in msbuild corresponding to the one
I have two List's which I want to check for corresponding numbers. for example
How do I convert a string into the corresponding code in PLT Scheme (which
Which C#/.NET Dependency Injection frameworks are worth looking into? And what can you say
Scenario: UITabBarController has three tabs corresponding to each of three view controllers which are
I created a class which holds data of type and returns an vector on
Which graduate program should I choose – SUNY Buffalo or SUNY Binghamton?
Which Database table Schema is more efficient and why? Users (UserID, UserName, CompamyId) Companies
Which class design is better and why? public class User { public String UserName;
Which of the following has the best performance? I have seen method two implemented

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.