On 29-04-2012 00:30, Manu wrote:
On 29 April 2012 00:42, Peter Alexander <[email protected] <mailto:[email protected]>> wrote:On Saturday, 28 April 2012 at 18:48:18 UTC, Walter Bright wrote: Andrei and I had a fun discussion last night about this question. The idea was which features in D are redundant and/or do not add significant value? A couple already agreed upon ones are typedef and the cfloat, cdouble and creal types. What's your list? Here's my list: - Properties. They add no value and just start pointless discussions about what should and shouldn't be a property. - UFCS. It's just sugar, but adds complexity. - const/immutable/inout/shared/__pure. These add massive complexity to the language for little (IMO) benefit. When I do multi-threading, I usually have to resort to casting. Maybe these will improve with time. - opDispatch. I think it just promotes sloppy, obfuscated code for minor syntactical benefit. Member access through pointers should require -> like in C++ so that you can overload it for smart pointer/reference ADTs. That's all I can think of for now. I disagree with every one of those points, except maybe 'shared', which seems like a good idea in theory, but I think it's completely broken (every interaction requires an explicit cast, and there is no facility for transfer of ownership, which is a VERY common operation in my experience)
For shared to be useful, every function you call on/with a shared object/value must be templatized. This may be nice if most of the code you write is template-rich, but like anything else, templates are not a silver bullet.
IMHO shared is heavily biased in its design, which is bad. -- - Alex
