Re:D Language accepted for inclusion in GCC
by int_19h on Wednesday June 21, 2017 @08:41PM
(#14609278)
I don't think a "better Python" can be statically typed - dynamic typing, and all the associated runtime tricks that you can do with it, is kinda part of what makes Python distinctive (whether for good or bad, opinions differ there).
Go has this "interface" thing which lets you do duck-typing, and it's checked at run-time, as the types in Python.
Re:D Language accepted for inclusion in GCC
by int_19h on Thursday June 22, 2017 @02:51PM
(#14614402)
This is consumer-side duck typing. Python also provides producer-side duck typing - you can make any of your objects a duck dynamically, by making them behave like a duck at runtime. I'm not aware of anything similar in Go wrt interfaces.
Re:D Language accepted for inclusion in GCC
by jupp0r on Thursday June 22, 2017 @12:37AM
(#14610155)
Rust also shines when it comes to high level abstractions. This is what attracts me to the language: as in C++, it covers the super low-level stuff, but it also powerful in business logic abstractions.
Re:D Language accepted for inclusion in GCC
by slaymaker1907 on Wednesday June 21, 2017 @10:45PM
(#14609776)
Go has far more in common with Java than it does with python. Arcane APIs that are incredibly difficult to use correctly while having a very simple base language.
Re:D Language accepted for inclusion in GCC
by krylon on Thursday June 22, 2017 @08:05AM
(#14611618)
I found the Go APIs I have worked with far more simple and idiomatic than any Java libraries I have worked with (which is admittedly not a lot).
It is, to a degree a matter of taste, of course, but Go APIs tend to be rather simple, whereas Java libraries seem to often have FileOpenDialogStyleTemplateProcessorFactoryFactory-type interfaces.
The major problem I have with Go currently is lack of function overloading, which means you either have to convert your data around a lot or have many similar functions for different data types that do the same thing (basically), but have different names.
I think the comparison with Python is quite fitting, because both languages encourage a certain way to think about and implementing things. For Python it's called pythonic, in Go it's called idiomatic.
Rust is the best bet we have at a better C (and a better low-level C++).
High level C++ competes with D and Go. Rust is a little too specifically targetted at the low level "systems" programming.