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

  • Home
  • SEARCH
  • 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 8681191
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T21:26:37+00:00 2026-06-12T21:26:37+00:00

I was just playing around with cpplint and tried running it on some code

  • 0

I was just playing around with cpplint and tried running it on some code I had written for fun. I realized that the following lines were flagged with the error message :-

#include <iostream>
...
#include <fstream>

yoohoo.cpp:3:  Streams are highly discouraged.  [readability/streams] [3]
yoohoo.cpp:5:  Streams are highly discouraged.  [readability/streams] [3]

I’m curious about why using streams is discouraged.

  • 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-06-12T21:26:38+00:00Added an answer on June 12, 2026 at 9:26 pm

    The main reason that streams may cause an issue is internationalization.

    Whenever you need to generate text with dynamic content in a couple different languages, things get awry because each language has its own grammar rules. For example, in English you would use:

    void print(std::ostream& out, int i) {
        out << "You retrieved ";
        switch(i) {
        case 0: out << "no file."; return;
        case 1: out << "1 file."; return;
        default: out << i << " files." return;
    }
    

    And that’s great right ?

    So when you translate to French, you simply decide to move all those 4 sentences parts in a table in which you will look them up by key, and it works!

    And then you discover Polish, from the gettext documentation, here are the plural forms of file (plik):

    1 => plik

    2,3,4 => pliki

    5-21 => pliko’w

    22-24 => pliki

    25-31 => pliko’w

    Hum… suddenly things are getting difficult, right ?

    Actually, it can get worse. Not all languages need to place your dynamic entries in the same order!

    This is why streams cannot actually be used for internationalized text short of writing an overloadable C++ function for each text to display, and have the translators provide the overloads! Hum…

    There are pros and cons for both, Google Style Guide is just very opinionated to ensure consistency as much as possible.

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

Sidebar

Related Questions

friends I was just playing around with some pointer programs and realized that the
I was just playing around with some code in LINQPad and managed to crash
I'm just playing around with some code. I create an Activity and simply do
I'm just playing around with some code but it seemed to have the specific
So, I was just playing around making some page for fun. I cannot seem
I have a very bad code written in my program, was just playing around
Just playing around with some sample code and hit on an unexpected problem with
Just playing around with Swing and wondering why the following code constructs a layout
Just playing around with memcache for the first time; here's my code: $memcache =
I am just playing around with some java programming and so I wanted a

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.