Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [standard-library]

The tag has no usage guidance.

0
votes
1answer
87 views

Common methods for swapping out a library

I am trying to come up with a solution to replace joda-time with java 8 time in our product. The code-base encompasses many projects of which some import joda-time directly and some transitively. To ...
29
votes
10answers
7k views

Why are standard libraries not programming language primitives? [closed]

I was thinking why are there (in all programming languages I have learned, such as C++, Java, Python) standard libraries like stdlib, instead of having similar "functions" being a primitive of the ...
2
votes
1answer
187 views

How to optimize reusing a large std::unordered_map as a temporary in a frequently called function?

Simplified question with a working example: I want to reuse a std::unordered_map (let's call it umap) multiple times, similar to the following dummy code (which does not do anything meaningful). How ...
2
votes
2answers
2k views

Why do we have to include multiple header files for a single library (the C standard library)?

I am not sure why there are so many header file for the C standard library (stdio.h, stdlib.h, math.h). How do these header files point to the same library? I guess I am a little bit confused about ...
3
votes
2answers
216 views

Why does Java's getSystemResourceAsStream silently consume IOExceptions?

While trying to debug a weird issue where I knew an exception should have been thrown but was not, I found the following in the Java standard library's java.lang.ClassLoader class: /** * Open for ...
2
votes
1answer
613 views

When was STL formally introduced into C++ standard?

I fail to infer the exact point of historical introduction of STL into actual C++ standard library from the wikipedia article: https://en.wikipedia.org/wiki/Standard_Template_Library It appears to me ...
3
votes
4answers
551 views

Equivalent of C library functions

In C, almost everything requires a function. What nags me is that I don't know exactly what's going on. If there was no msvcrt.dll file, my C programs would all break because that's where all the ...
-1
votes
1answer
140 views

Should there be print statements in a library

I have built a library that is being used by a few people. They say that library has a few print statements which is wrong because a library should give freedom to users to use the library the way ...
6
votes
3answers
5k views

Why would an interface override methods of the interface(s) it extends in Java 7?

I was looking at Map and SortedMap documentation from Java 7 and I have realized that SortedMap, which extends Map overrides entrySet(), keySet() and values(). AFAIK, interfaces cannot implement a ...
0
votes
1answer
109 views

Who should I submit a bug to when two vendor libraries collide?

I found a bug. Yay for me. The bug is such a mix of technologies I am not sure who I should submit the bug to. The bug is a mix of Adobe Experience Manager and Angular Materials. Neither is really ...
0
votes
2answers
184 views

Basing all .NET applications on a central CORE library? [closed]

The company I work for was recently acquired by a much larger company. In conversation with their IT systems group there was some discussion about modifying the existing programs so that they use a '...
3
votes
1answer
1k views

Does Java's Object.wait() really achieve nanosecond accuracy?

I was checking out the Java 8 standard library source code just out of curiosity, and found this in java/lang/Object.java. There are three methods named wait: public final native void wait(long ...
1
vote
2answers
528 views

Is there a stricter strtoull() in any ubiquitous C library?

I want a function that will interpret a string as a strictly unsigned integer, failing when the string overflows, represents a negative number, or does not represent a number. strtoull() does set ...
47
votes
5answers
11k views

Why do all <algorithm> functions take only ranges, not containers?

There are many useful functions in <algorithm>, but all of them operate on "sequences" - pairs of iterators. E.g., if I have a container and like to run std::accumulate on it, I need to write: ...
17
votes
3answers
2k views

Why isn't there a typeclass for functions?

In a learning problem I've been messing around with, I realised I needed a typeclass for functions with operations for applying, composing etc. Reasons... It can be convenient to treat a ...
1
vote
1answer
1k views

Languages with graph data structures and algorithms in standard library

I am trying to improve my knowledge and ability with graphs and graph algorithms and have noticed something curious: as far as I can tell no "mainstream" language contains support for graphs in its ...
1
vote
1answer
2k views

Performance overhead of standard containers and boost [closed]

Adap.TV has chosen C++ to develop their software. However, they've decided not to use the standard containers1 and boost for performance reasons, as they've blogged about it in the following article: ...
9
votes
4answers
2k views

What language should I use for making a cross platform library? [closed]

I want to build a SyncML parsing library (no UI) which should be able to build up messages based on information provided by the host application, fed in by the library's methods. Also, the library ...