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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T15:24:20+00:00 2026-05-28T15:24:20+00:00

today I’ve a design question, to have an easy to read code. Should we

  • 0

today I’ve a design question, to have an easy to read code.
Should we mark a call by reference function?

Because when a new programmer see this line

funkyName($funkyVar);

he might think “oh, whats happen here? a function but it actually does nothing further, no assignments or anything else. I should delete it to keep the code clean…”

OK, this is hard! But it happens 😉

So, should we mark the function, are there ideas in the past? Maybee in other languages than PHP?

Or do you think call by reference sucks. And we should only do this on large datasets for performance reason?

I’m looking forward to your comments, netzaffin

  • 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-28T15:24:20+00:00Added an answer on May 28, 2026 at 3:24 pm

    In C and C++, a const-correct program will mark arguments to functions which do not effect changes upon them with const as in:

    void SomeFunction (void const * const p);
    

    Which is a function which accepts a void pointer, whose value cannot be changed, and which points to memory which also cannot be changed.

    Therefore you can be assured calling this function and passing it memory, that the memory will not be changed.

    C++’s const_cast kind of rains on this parade — allowing you to break const-correctness — but the concept (and general rule) remains.

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

Sidebar

Related Questions

today I have a quick question. Here is my function: function checkheight() { var
Today I had a coworker suggest I refactor my code to use a label
Today at work we came across the following code (some of you might recognize
Today I had a discussion with a colleague about nested functions in Javascript: function
Today we have received some strange exceptions on our production website. They all have
Today I was creating new instances and I noticed something weird on it. I
today i need your help to get an specific sql select query. i have
today I have deployed my first MVC 2 application on Windows Server 2008, and
Today I have checked performance statistics of my website using YSlow . I got
Today I was reading code from some very popular numerical libraries written in FORTRAN

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.