News for hackers. Stuff that matters.
Re:Design patterns implemented in Java by flavio81 on Tuesday August 29, 2017 @05:10PM (#15127629)
I realize i made an anachronical mistake. However the Design Patterns book and the 'design patterns' mindset is most popular with Java developers.

Sorry but I do stand on my criticism of Design Patterns as applied today.

> The language most of the examples are written in, C++, does allow multiple inheritance and metaprogramming,

You're being very generous with C++ if you consider it does allow metaprogramming. It does not, if we compare it with the languages that make good use of metaprogramming: Lisp, Scheme, Racket, and now Julia.

Re:Design patterns implemented in Java by chii on Tuesday August 29, 2017 @07:01PM (#15128325)
You cant move the goal post! C++ template is meta programming, as it's Turing complete. It's ugly and messy, but usable enough.
Re:Design patterns implemented in Java by kazinator on Wednesday August 30, 2017 @01:03AM (#15129830)
C++ template meta programming isn't Turing complete in a way that is useful.

Turing Complete means that you can calculate any partial recursive function (given some suitable input encoding).

For instance, in pure Lambda Calculus that has only functional terms (no numbers), we an make integers out of function using "Church numerals" and then calculate functions over these numbers. No amount of such calculation will produce an integer object, though.

Similarly C++ template cannot calculate any C++ syntax whatsoever, in spite of Turing Completeness. You get template functions and template classes; that's it.

Re:Design patterns implemented in Java by flavio81 on Tuesday August 29, 2017 @07:34PM (#15128528)
There is a ton of usability, scope, and power difference between the metaprogramming of C++ templates versus the metaprogramming of the Lisp family of languages (and Julia), which is what is usually considered as metaprogramming in the practical sense, languages that are arguably designed around metaprogramming as a fundamental feature.

Just as assembly language is also turing complete, but there is also a ton of usability difference between it versus C/C++, in favor of C/C++ and with little performance penalty.

Re:Design patterns implemented in Java by kazinator on Wednesday August 30, 2017 @01:06AM (#15129840)
More importantly than Turing complete, assembly language has complete access to the machine resources and data representations.

A language can be Turing Complete, yet do only pure calculation plus I/O strictly in Roman numerals on two predefined streams.

Good luck decoding a JPEG with that, right?