Computer Science, asked by PragyaTbia, 1 year ago

What is generic programming?

Answers

Answered by theking20
0

Generic Programming is a type of Computer Programming.

  • It is most commonly used in Python, Ada, C#, Java, Rust, Swift, TypeScript etc.
  • In this Programming concept, algorithms are used with a to-be parameter (with mutiple types, Integer, String etc.) to different methods.
  • It is implemented so that the code becomes more efficient.
  • Generic Programming allows the programmer to write a general algorithm that may work with multiple data types.
  • There are multiple advantages to Generic Programming also: Code Reusability, Multiple Usages, Reduce Function Overloading etc.
  • These can be used with Templates also.
Answered by smartbrainz
0

Generic programming:

  • 'Generic programming' is a computer programming style where algorithms are written in terms of 'to-be-specified-later' types that are then instantiated as and when required for specific types given as parameters.
  • Generic programming deals with compile-time mistakes, which are easier and faster to solve. The program gets maximum efficiency by using generic programming.  
  • The programmers can create their classes, methods, interface, and delegates using generic programming. This approach allows writing generic functions or types that vary only in the set of types on which they operate when they are used, thus decreasing duplication.

To know more about generic programming

What is generic subprogram in principles of programming languages?

https://brainly.in/question/8948966

What is programming paradigm in c++

https://brainly.in/question/4618630

Similar questions