On Wednesday, 2 August 2017 10:51:43 UTC+3, ecstati...@gmail.com wrote: > > For all the common parts with Go (functions, methods, reference classes, > strings, arrays, slices, ranges, foreach, etc), honestly I don't know why > you say it's simpler in Go. > > Can you show me two examples of code side by side, and tell me "look how > much simpler it's with Go's" ? > > Because from what I read, I'm sometimes wondering if you really know that > the type declarations in D are MUCH simpler than in C/C++. >
error* (**callbacks)(int); Error[] function(int)[][string] callbacks; var callbacks map[string]func(int) []error > For instance : > > int[] > first_array_of_ints, > second_array_of_ints; > > int[string] > first_map_of_ints_indexed_by_a_string, > second_map_of_ints_indexed_by_a_string; > > TYPE > first_reference_to_an_object_of_this_type, > second_reference_to_an_object_of_this_type; > > So, with all due respect, how many applications have you already > programmed in D before telling me that Go's syntax is so simpler to use and > to learn ? > > I agree there are much *less* possibilities in Go, but that doesn't mean > it's automatically a simpler language to learn for all the common parts > with D. Seriously. > > Because I had to learn both, and at least for a C++/Java/C# programmer > like me, D transition was almost immediate, really a matter of hours to > become comfortable with the language. Everything was alike, but much > simpler and easier than in C++. > > Believe me or not, I've taught programming with D to my two teenagers with > D. Really. > > I've chosen it because it was the only strongly-typed language close to > Javascript that was really easy to learn, while allowing them to quickly > switch to C++, Java or C# later if they wanted to. > > Go is much simpler than C++ too, I agree of course, but for having learned > both Go then D, again from the point of view of a former C++/Java/C# > programmer like me, I didn't feel that quickly at home with Go than with D, > mainly because Go diverged much more from its predecessors than D from a > syntactic point of view. > > So, again from a syntactic point of view, I don't think how you can affirm > that it's much easier in Go than in D to declare and use types, references, > functions, methods, slices, arrays, foreach, and all the common stuff > between both languages. > > Honestly, no offense intended. > > On Tuesday, August 1, 2017 at 10:11:10 PM UTC+1, Doğan Kurt wrote: >> >> But from my personal experience, D is *at least* as easy to learn than >>> Go, if not easier. >> >> >> I seriously doubt, no offense. Go is so small and so intuitive, one can >> argue that there are people out there who knows most of the Go unknowingly >> :) >> >> Just the fact that it doesn't break much with the familiar syntax of C#, >>> Java, C++, etc helps a lot in making the transition. >>> >> >> Go's syntax is very familiar to C, i've never heard it was an issue. The >> only think you must get used to is declarations and i LOVE the Go way. I >> remember the days i was struggling with C's declaration model, the spiral >> rule etc. sure we use typedefs but it rather feels like a hack. >> I can write any declaration no matter how complex it is, with my eyes >> closed in Go. It's so great. >> >> And genericity and polymorphism are invaluable tools when optimizing code >>> reuse without reducing execution speed. >>> >> >> I don't ever remember duplicating any code in C. I can't understand how >> people are unable to write reusable code with C, seriously. Whenever i >> discuss this with a C++ programmer, they immediately share some generic Max >> function that works with int and double. I admit i use macros in that >> case, but come on it's not even 1% of the serious programming you do in C. >> >> If you are a competent C programmer (structured programming in general), >> you know how to write reusable code. >> > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.