Questions tagged [implementation]

Deals with various issues of implementation.

Deals with various issues of implementation of functions, features, languages, etc.

1998 questions
295
votes
5 answers

Gradle Implementation vs API configuration

I'm trying to figure it out what is the difference between api and implementation configuration while building my dependencies. In the documentation, it says that implementation has better build time, but, seeing this comment in a similar question…
reinaldomoreira
  • 3,568
  • 2
  • 12
  • 27
58
votes
12 answers

Room cannot find implementation

I have a problem with testing a Room database: when I run the test, I get this exception: java.lang.RuntimeException: cannot find implementation for database.TicketDatabase. TicketDatabase_Impl does not exist at…
Federico Taschin
  • 1,183
  • 2
  • 8
  • 20
44
votes
4 answers

DDD - which layer DTO should be implemented

I am learning about DDD so apologies if my question is naive. I think I need to use Local Data Transfer Object in order to display data to the users as a lot of properties are not part of any of Entity / Value Objects. However, I am not sure where…
user2105030
  • 451
  • 1
  • 4
  • 6
30
votes
1 answer

Which provider should be used for the Java Persistence API (JPA) implemenation

I want to use the Java Persistence API (JPA) for my web application. There are popular JPA implementations like Hibernate, Toplink and EclipseLink. What implementation is a good choise and why?
Dimitri Dewaele
  • 9,061
  • 17
  • 67
  • 116
24
votes
2 answers

As of 2016, is there a Scheme implementation which supports 100% of R7RS (small) with no deviations?

I am willing to learn Scheme. I want to stick to R7RS since it's the last standard. However, it seems that there is a lot of fragmentation on the Scheme current implementations, and most of them staying at R5RS or part of R6RS. The only one I have…
22
votes
2 answers

private template functions

I have a class: C.h class C { private: template void Func(); // a lot of other functions }; C.cpp // a lot of other functions template void C::Func() { // the implementation } // a lot of other functions I know, that it's…
Alek86
  • 1,387
  • 1
  • 14
  • 25
22
votes
3 answers

Clarification for "it should be possible to change the value of 1" from the CPython documentation

See this link: https://docs.python.org/3/c-api/long.html#c.PyLong_FromLong The current implementation keeps an array of integer objects for all integers between -5 and 256; when you create an int in that range, you actually just get back a…
user13595466
21
votes
1 answer

How is setTimeout implemented in the javascript interpreters or timers in general?

How is a function called after a time has passed implemented in javascript or any other interpreted language? In other words, is there a loop behind in the javascript interpreter that checks all the time a list of timers, or is there any particular…
alvatar
  • 3,080
  • 5
  • 35
  • 50
20
votes
2 answers

In .NET, what is the internal implementation of a delegate?

I understand that a declaration of a delegate is something like this: public delegate int PerformCalculation(int x, int y); However, there must be more going on. The purpose of the delegate is to provide a pointer to a method, and to do that you…
richard
  • 10,572
  • 20
  • 83
  • 144
20
votes
5 answers

Why should I use an interface when there is only one implementation class?

I'm new at programming and I'm learning Java. I was just wondering why I should use an interface when there is only one implementation class?
Qais Sahel
  • 217
  • 2
  • 6
19
votes
6 answers

How are try/catch blocks implemented?

If an exception occurs in a try block, how is execution transferred to the catch block? This is not a C#/Java/C++ question, I'm just wondering how it works internally.
selvaraj
  • 839
  • 2
  • 16
  • 29
18
votes
6 answers

How does this implementation of std::is_class work?

I'm trying to understand the implementation of std::is_class. I've copied some possible implementations and compiled them, hoping to figure out how they work. That done, I find that all the computations are done during compilation (as I should have…
user3190123
17
votes
2 answers

How do I make a struct callable?

#![feature(unboxed_closures)] #![feature(fn_traits)] struct foo; impl std::ops::Add for foo { type Output = foo; fn add(self, x: foo) -> foo { println!("Add for foo"); x } } impl Fn for foo { extern "rust-call" fn…
17
votes
4 answers

Does the JVM create a mutex for every object in order to implement the 'synchronized' keyword? If not, how?

As a C++ programmer becoming more familiar with Java, it's a little odd to me to see language level support for locking on arbitrary objects without any kind of declaration that the object supports such locking. Creating mutexes for every object…
Joseph Garvin
  • 18,725
  • 17
  • 83
  • 150
17
votes
5 answers

Can a child class implement the same interface as its parent?

I've never encountered this issue before today and was wondering what convention/best practice for accomplish this kind of behavior would be. Basic setup is this: public interface IDispatch { void Dispatch(); } public class Foo : IDispatch { …
Jesse Carter
  • 15,540
  • 6
  • 51
  • 79
1
2 3
99 100