Size: a a a

Чат "Программист"

2020 June 27

K

Kit Coder in Чат "Программист"
Переслано от Kit Coder
ОРРУ
источник

K

Kit Coder in Чат "Программист"
Переслано от Kit Coder
источник

K

Kit Coder in Чат "Программист"
Переслано от Kit Coder
источник

K

Kit Coder in Чат "Программист"
источник

Б

Брахма in Чат "Программист"
ладно...
источник

K

Kit Coder in Чат "Программист"
Переслано от Kit Coder
Я ахуэла,но мне понравилось https://youtu.be/XAqq5yqR-T4
источник

K

Kit Coder in Чат "Программист"
Крута
источник

P

Phantom in Чат "Программист"
Tomas Holshtein
Так это ж называется шаблонными классами
Это в C++
источник

TH

Tomas Holshtein in Чат "Программист"
Phantom
Это в C++
В java так же
источник

TH

Tomas Holshtein in Чат "Программист"
Суть несёт одну и ту же
источник

P

Phantom in Чат "Программист"
Tomas Holshtein
В java так же
Я думал там тоже дженерики
источник

P

Phantom in Чат "Программист"
Хз
источник

P

Phantom in Чат "Программист"
Но по сравнению с C++, java и C# сосут
источник

TH

Tomas Holshtein in Чат "Программист"
Phantom
Но по сравнению с C++, java и C# сосут
Почему это
источник

TH

Tomas Holshtein in Чат "Программист"
Я чёт не припомню кардинальных отличий с++ от java/С# в этом плане
источник

K

Kit Coder in Чат "Программист"
Tomas Holshtein
Я чёт не припомню кардинальных отличий с++ от java/С# в этом плане
А они не в этом плане, они ввобщем плане
источник

P

Phantom in Чат "Программист"
The following are the key differences between C# Generics and C++ templates:

C# generics do not provide the same amount of flexibility as C++ templates. For example, it is not possible to call arithmetic operators in a C# generic class, although it is possible to call user defined operators.

C# does not allow non-type template parameters, such as template C<int i> {}.

C# does not support explicit specialization; that is, a custom implementation of a template for a specific type.

C# does not support partial specialization: a custom implementation for a subset of the type arguments.

C# does not allow the type parameter to be used as the base class for the generic type.

C# does not allow type parameters to have default types.

In C#, a generic type parameter cannot itself be a generic, although constructed types can be used as generics. C++ does allow template parameters.

C++ allows code that might not be valid for all type parameters in the template, which is then checked for the specific type used as the type parameter. C# requires code in a class to be written in such a way that it will work with any type that satisfies the constraints. For example, in C++ it is possible to write a function that uses the arithmetic operators + and - on objects of the type parameter, which will produce an error at the time of instantiation of the template with a type that does not support these operators. C# disallows this; the only language constructs allowed are those that can be deduced from the constraints.
источник

TH

Tomas Holshtein in Чат "Программист"
Kit Coder
А они не в этом плане, они ввобщем плане
Ну это понятное дело
источник

P

Phantom in Чат "Программист"
Phantom
The following are the key differences between C# Generics and C++ templates:

C# generics do not provide the same amount of flexibility as C++ templates. For example, it is not possible to call arithmetic operators in a C# generic class, although it is possible to call user defined operators.

C# does not allow non-type template parameters, such as template C<int i> {}.

C# does not support explicit specialization; that is, a custom implementation of a template for a specific type.

C# does not support partial specialization: a custom implementation for a subset of the type arguments.

C# does not allow the type parameter to be used as the base class for the generic type.

C# does not allow type parameters to have default types.

In C#, a generic type parameter cannot itself be a generic, although constructed types can be used as generics. C++ does allow template parameters.

C++ allows code that might not be valid for all type parameters in the template, which is then checked for the specific type used as the type parameter. C# requires code in a class to be written in such a way that it will work with any type that satisfies the constraints. For example, in C++ it is possible to write a function that uses the arithmetic operators + and - on objects of the type parameter, which will produce an error at the time of instantiation of the template with a type that does not support these operators. C# disallows this; the only language constructs allowed are those that can be deduced from the constraints.
источник

Б

Брахма in Чат "Программист"
чарм не понимает моей идиллии!
источник