News for hackers. Stuff that matters.
Re:Why Go and Not Rust? by takeda on Monday September 16, 2019 @01:35PM (#20986558)
Don't know Fortran, but while C doesn't have generics you're getting similar behavior due to macros (for example min(), max() are macros) and weak typing. So the need of having generics there is much weaker.
Re:Why Go and Not Rust? by fwip on Monday September 16, 2019 @01:58PM (#20986797)
There are a number of tools (and the "go generate" construct) designed to support code generation. If you just want macro-level behavior, that's easy to do.
Re:Why Go and Not Rust? by takeda on Monday September 16, 2019 @02:48PM (#20987280)
Yes, and that's what I'm currently doing, but it is essentially just automating writing the same code multiple times. It still has issues, like having to remember to regenerate the code on change, or making harder to use IDE features to refactor. There are also some limitations it has.
Re:Why Go and Not Rust? by nine_k on Monday September 16, 2019 @03:16PM (#20987554)
> automating writing the same code multiple times

What would you call a language that forces you to write / use a preprocessor to introduce higher-level features?

Low-level. More specifically, low-level for the domain where you're working. C is admittedly low-level because it had to be minimal even for 1970 and close to the metal. Other languages usually enjoy less drastic design constraints.

Re:Why Go and Not Rust? by pjmlp on Monday September 16, 2019 @05:05PM (#20988580)
Yep, that is why some were already using PL/I and Algol dialects almost 10 years before C came to be, alongside Fortran, Cobol and Lisp.
Re:Why Go and Not Rust? by pjmlp on Tuesday September 17, 2019 @03:03AM (#20992441)
Just like Borland C++ 2.0 for MS-DOS did, before templates were started to be designed.

I let you research when it was released.

Re:Why Go and Not Rust? by pjmlp on Tuesday September 17, 2019 @03:01AM (#20992432)
Even C does have generics now (_Generic) even if quite limited.
Re:Why Go and Not Rust? by takeda on Tuesday September 17, 2019 @01:06PM (#20997495)
Neat, I had no idea.