On 04/28/2012 11:42 PM, Peter Alexander 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.


- UFCS:
   The complexity comes from having multiple function invocation
   syntaxes. UFCS actually makes that situation better without adding a
   lot of complexity to the compiler implementation.

- const/immutable/shared/pure
   shared: The fact that everything that is not marked as shared is
   actually thread-local is extremely important. I think most other
   imperative languages got this wrong.
   But if shared is explicit in the type system, immutable really
   should be explicit too. The sad part is that the qualifiers don't
   play nicely with reference types at the moment.

- opDispatch
   This is useful and of significant value if used the right way.
   I hope you are not actually serious about that '->' part.

Reply via email to