On Wednesday, 22 June 2016 15:32:53 UTC+3, Andrew Mezoni wrote: > > >> The version without generics is necessary to compare how well a > particular generics approach improves the current language and code. > > I am sorry but this is obviously that any useful feature (in the context > of solving problems) improves the current language and code. >
Yes.. Of course, this presupposes that the particular generics approach is useful. How would you demonstrate that one generics approach is more useful than another? Another question: how new (version of the) language will look cosmetically > with this newly added feature. > > I found that the second question here more important then the first. > > It is obviously correct that the code with a generics (in appropriate > place) would be more useful then other code. > Which generics approach? Which places need that kind of generics? Should the language solve all generics related problems or only some? Are there better solutions to those problems than generics? Would some meta-programming approach negate the need for generics? Also, is "useful in some particular case" the best metric to decide whether something should be included in the language? e*.g. #define max(a,b) ((a) < (b) ? (b) : (a))* But here I undestand one interesting thing which states: Some obviously > useful feature can significantly spoil the overall picture of language. > > For me this is very strange only because even a C language also has been > improved after when it initially was introduced. > Have you also looked at the proposals that were rejected? If someone made the proposal, it must have been useful to someone. In the years following the publication of K&R C, several features were > added to the language, supported by compilers from AT&T and some other > vendors. These included: > > - void <https://en.wikipedia.org/wiki/Void_type> functions (i.e., > functions with no return value) > - functions returning struct > > <https://www.google.com/url?q=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FStruct_(C_programming_language)&sa=D&sntz=1&usg=AFQjCNGMpxljynRsp0arexfbbYiIVI6e8A> > or union <https://en.wikipedia.org/wiki/Union_(computer_science)> types > (rather than pointers) > - assignment > <https://en.wikipedia.org/wiki/Assignment_(computer_science)> for > struct data types > - enumerated types > > <https://www.google.com/url?q=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FEnumerated_type&sa=D&sntz=1&usg=AFQjCNENRRCDFgaUYRL6sB7dupflS9VyVQ> > > Were there any competing proposal for those same feature sets? Why were the others rejected whereas these particular ones accepted? Also, what if, instead functions just allowing returning struct/unions, it would have also allowed to return multiple parameters? Would that have resulted better or worse C code? > C99 introduced several new features, including inline functions > <https://www.google.com/url?q=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FInline_function&sa=D&sntz=1&usg=AFQjCNGef0HJ1HzuhH-qm_foMSQJU_QQKQ>, > > several new data types <https://en.wikipedia.org/wiki/Data_type> > (including long long int and a complex type to represent complex numbers > <https://en.wikipedia.org/wiki/Complex_number>), variable-length arrays > <https://www.google.com/url?q=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FVariable-length_array&sa=D&sntz=1&usg=AFQjCNH3-YnfdW5WwcILzIzcowpeEz21HA> > and flexible array members > <https://www.google.com/url?q=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FFlexible_array_member&sa=D&sntz=1&usg=AFQjCNHhZ9wAiW9N2OG_MT2UqlbkLFvjAw>, > > improved support for IEEE 754 <https://en.wikipedia.org/wiki/IEEE_754> > floating > point, support for variadic macros > <https://en.wikipedia.org/wiki/Variadic_macro> (macros of variable arity > <https://en.wikipedia.org/wiki/Arity>), and support for one-line comments > beginning with // > > The C11 standard adds numerous new features to C and the library, > including type generic macros, anonymous structures, improved Unicode > support, atomic operations, multi-threading, and bounds-checked functions. > > P.S. > > I guess I should think that this is very bad, because my first > acquaintance with the language began with the ZX-Spetrum and continued with > the Borland Turbo C. > > Indeed, the C language is now looks much worse cosmetically than before. > But should I regret it? > Maybe... > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.