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 7051071
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:13:12+00:00 2026-05-28T03:13:12+00:00

In the Go programming language; how can pointers to pointers become useful? (Why are

  • 0

In the Go programming language; how can pointers to pointers become useful?

(Why are they not illegal if they are not really useful?)

  • 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-28T03:13:13+00:00Added an answer on May 28, 2026 at 3:13 am

    The usefulness of any data type depends on the problem being solved and on the method used to solve the problem. If a data type does not fit the problem, it simply does not fit the problem – and there is nothing more to it.

    The Go programming language (as well as most other programming languages) is based on simple rules that the programmer can use to build new data types. Some of these rules are:

    • *T: create a new data type that is a pointer to T
    • [10]T: an array of Ts
    • struct { t T; u U ... }: a structure which contains a T as a component
    • …

    The programmer can create complex data types by composing these simple rules. The total number of possible data types exceeds the number of useful data types. Clearly, there exist (and have to exist) data types which aren’t useful at all. This is just a natural consequence of the fact that the rules for building new data types are simple.

    The type **T falls into the category of types which are less probable to appear in a program. The fact that it is possible to write *****T doesn’t imply that such a type has to be immensely useful.


    And finally, the answer to your question:

    The type **T usually appears in contexts where we want to redirect users of a value of type T to another value of type T, but for some reason we do not have access to all users of the value or finding the users would cost too much time:

    1. We do not want to copy values of type T (for some reason)
    2. We want all users of a value of type T to access the value via a pointer
    3. We want to quickly redirect all users of a particular value of type T to another value

    In such a situation, using **T is natural because it allows us to implement the 3rd step in O(1):

    type User_of_T struct {
      Value **T
    }
    
    // Redirect all users of a particular value of type T
    // to another value of type T.
    func (u *User_of_T) Redirect(t *T) {
      *(u.Value) = t
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any really low level programming language that can get access the memory
It does not matter what programming language. Can anyone please give me an idea
Can someone recommend a file format/dtd/programming language that is not too finnicky/verbose when it
Can anyone suggest me a helpful programming language which can be used to create
What do you call a programming language that can execute its own code (passed
Has anyone worked with the programming language Church ? Can anyone recommend practical applications?
It has been said that C# can be regarded as a functional programming language,
How can I, in Java or using some other programming language, add a new
Why in java (I dont know any other programming languages) can an identifier not
I'm trying to find a programming language I feel really comfortable learning and using

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.