News for hackers. Stuff that matters.
Re:Go Turns 10 by ngrilly on Friday November 08, 2019 @04:26PM (#21486986)
> And yet it still feels like a language out of the 60s or 70s.

I started programming in the 80s, and Go feels modern even compared to the mainstream languages of this era (mainly BASIC, Pascal and C).

It also feels modern compared to the first versions of Java in the 90s.

You don't like Go and I respect that, but Go definitely reflects its time, the 2000s, with its syntax, automatic type deduction, GC, gofmt, interfaces, goroutines, closures, built-in HTTP, built-in testing framework, etc.

Re:Go Turns 10 by flavio81 on Friday November 08, 2019 @07:32PM (#21488515)
>but Go definitely reflects its time, the 2000s

more like the 60s, with a primitive type system, no metaprogramming, no interactive development, etc.

Re:Go Turns 10 by ngrilly on Saturday November 09, 2019 @06:13AM (#21490836)
Sure, punched cards and teleprinters were great for interactive development in the 1960s. You probably live in an alternate timeline ;)
Re:Go Turns 10 by baby on Friday November 08, 2019 @09:12PM (#21489091)
no metaprogramming is a feature. Have you read C++ libraries?
Re:Go Turns 10 by lasagnaphil on Saturday November 09, 2019 @02:05AM (#21490101)
C++'s template metaprogramming was "found" as an accident, and is a very bad example of metaprogramming as a whole. (Techniques like SFINAE and CRTP seem more like a hack, and leaves a bad taste in your mouth when you use it.)

What we should talk about instead: hygienic macros in Scheme/Rust, AST-level modification in Nim, dependent types, etc. I think metaprogramming is an aspect of programming that should be explored more, and is definitely useful for reducing boilerplate.

Re:Go Turns 10 by hechang1997 on Friday November 08, 2019 @09:58PM (#21489275)
C++ template metaprogramming may be overused and very difficult to use, but its prevalence despite such difficulty precisely shows how much such a type level metaprogramming tool is desired (compared to syntax level ones like lisp macros or text level ones like C preprocessor and various code generators). New programming languages should try to improve upon C++ template metaprogramming and make more powerful and effective metaprogramming language constructs, instead of completely abandoning the front.
Re:Go Turns 10 by mantap on Friday November 08, 2019 @11:49PM (#21489692)
This is the putting one's head in the sand methodology of programming lanaguge design.

Go's answer to metaprogramming is source code generation. There are many problems with C++ but the existence of the template system isn't one.

Re:Go Turns 10 by acroback on Saturday November 09, 2019 @09:26AM (#21491716)
For you it isn't. But for a lot of us it is cumbersome and just plain complex.
Re:Go Turns 10 by mantap on Saturday November 09, 2019 @11:55AM (#21492593)
The source of complexity is in the problems C++ is designed to solve. I use C++ metaprogramming for problems that require it.

Sure, Boost is full of metaprogramming insanity, but with today's C++ standard library it's not necessary to use Boost.

10 years ago template heavy code in C++ did suck, because we had slow compilers, dumb build systems, 7200 rpm HDDs and a need to use Boost to augment the bare bones standard library.

I'll be the first to admit that C++ has decades of cruft and design errors. But the metaprogramming works pretty well now. C++'s current problems are (IMO) weird undefined behavior, e.g. the distinction between POD and non-POD types; having both pointers and references, the ancient exception system, and in general a lack of tools for enforcing memory safety.