Re:Go proposal: new package to provide generic slice functions
by pjmlp on Wednesday May 05, 2021 @11:22AM
(#27051065)
Two anecdotes why I hate the way they went with //go:generate as workaround.
Borland first attempt to C++ "generics" was the initial release of Borland International Data Structures 1.0 (BIDS) around 1990, where they used the preprocessor to generate multiple copies, something like
#define LIST_T int
#define LIST_TYPE MyIntList
#include <bids/list.h>
Rice and repeat for all required types, when BIDS 2.0 came out this was already replaced by experimental templates support.
Around 2005 it was common to use Eclipse EMF framework, alongside plugins to generate Java code (<= 1.4) that would create type safe subclasses from collections with Object.
So learning is a hard process, then again this was their point of view when C was created,
> Although we entertained occasional thoughts about implementing one of the major languages of the time like Fortran, PL/I, or Algol 68, such a project seemed hopelessly large for our resources: much simpler and smaller tools were called for. All these languages influenced our work, but it was more fun to do things on our own.
Borland first attempt to C++ "generics" was the initial release of Borland International Data Structures 1.0 (BIDS) around 1990, where they used the preprocessor to generate multiple copies, something like
Rice and repeat for all required types, when BIDS 2.0 came out this was already replaced by experimental templates support.Around 2005 it was common to use Eclipse EMF framework, alongside plugins to generate Java code (<= 1.4) that would create type safe subclasses from collections with Object.
So learning is a hard process, then again this was their point of view when C was created,
> Although we entertained occasional thoughts about implementing one of the major languages of the time like Fortran, PL/I, or Algol 68, such a project seemed hopelessly large for our resources: much simpler and smaller tools were called for. All these languages influenced our work, but it was more fun to do things on our own.