Re:How an Engineering Company Chose to Migrate to D
by jerf on Wednesday June 20, 2018 @02:30PM
(#17358231)
Speaking at least for Go, the "different syntax" between closures and functions is that for closures, you don't give a function name. The only way they could be any more similar is if closures did take a function name, which is generally a bad idea because there's no single behavior I've seen that captures what programmers expect to happen in that case. (In general, for the code
x = func blah() { ... }
there is a conflict between "x is the only new binding we should have as a result of executing that line" and "the function name 'blah' should do some sort of binding".)
If that's enough to throw your translation process, you've got bigger problems....
(Cards on the table, D is probably a good choice and I'm not advocating for Go here.)
If that's enough to throw your translation process, you've got bigger problems....
(Cards on the table, D is probably a good choice and I'm not advocating for Go here.)