What’s Wrong with OOP and FP

eles eles at eles.com
Wed Nov 13 01:25:50 PST 2013


On Wednesday, 13 November 2013 at 08:39:06 UTC, logicchains wrote:
> On Wednesday, 13 November 2013 at 07:55:59 UTC, Froglegs wrote:

> If you were working in an Enterprise (TM) with coworkers who 
> were potentially competence-challenged, would you want them 
> having access to the power of D's compile time code generation? 
> Would you like to read and debug code that randomly 
> intermingled D's different function call methods; having to 
> determine whether foo.bar represents calling the bar method of 
> foo, calling the function bar with foo as an argument, or 
> accessing the field bar on object foo?

Unfortunately, yes, you did hit a nail here. I don't really like 
this way of "calling" functions. If they were only properties, 
OK, but for general functions...

I dunno if it is implemented, but I recall Walter beign quite 
supportive of accepting that:

foo.bar;

is a function call...

A lot of confusion stems from the fact that properties are seen 
more like functions than variables (in the D community). I feel 
it should be the other way around.

Or, simply, get rid of properties completely until better ideas 
come.


More information about the Digitalmars-d mailing list