2 ms·
"Spaghetti" means that the code is tangled because of improper control flow usage, lack of adequate control flow syntax or the language encouraging certain patt
by blub 6y ago
"Spaghetti" means that the code is tangled because of improper control flow usage, lack of adequate control flow syntax or the language encouraging certain patterns. There are very few mainstream programming languages which can be said to encourage writing spaghetti code, I can think of VB6 and early versions of PHP which encouraged mixing e.g. HTML with code. Claiming that C++ spaghetti code is idiomatic is nonsense. There are many very popular references on how to structure and design C++ code and idiomatic C++ code is making use of structural, OOP or functional programming where appropriate.
"Magic" refers to the implementation of certain language or library features directly in the compiler without using the language features. C++ is on the least magical side, since the entire standard library and major libraries are implemented exclusively using language features. Everything is specified and C++ is one of the very few languages which has an international standard.
It's especially odd to call other languages out for this when Go for example has magical generic data structures when this feature isn't supported by the language.
Next time consider limiting your comment to praising Go and don't pretend that you know enough about other languages to draw a meaningful comparison.