@property - take it behind the woodshed and shoot it?

Timon Gehr timon.gehr at gmx.ch
Thu Jan 24 18:51:46 PST 2013


On 01/25/2013 03:44 AM, deadalnix wrote:
> On Thursday, 24 January 2013 at 18:05:25 UTC, Andrei Alexandrescu wrote:
>> On 1/24/13 9:47 AM, Artur Skawina wrote:
>>> Having ()-less function calls is just insane; if it isn't obvious to
>>> you why,
>>> you just haven't read enough code that (ab)uses them.
>>
>> You see, this is the kind of argument that I find very damaging to the
>> conversation. It lacks any shred of material evidence, evokes emotion,
>> manipulates the reader's opinion (framing them into
>> incompetent/inexperienced if they disagree), and implies an appeal to
>> authority. Please don't do that anymore.
>>
>
> Let me rephrase that in a proper way.
>
> Functional style is very painful right now. Function you pass as
> argument are executed implicitly, function as variable don't behave like
> native ones, and with the new proposal, it add confusion on the function
> returned.
>
> It is kind of dumb that D do not promote functional style as it has
> shown to solve many problems that arise right now.

The main issue is horrible garbage collector performance for many small 
allocations. Syntactically we could do what scala does:

scala> def fun()=2
fun: ()Int

scala> fun : Int
res0: Int = 2

scala> fun : (()=>Int)
res1: () => Int = <function0>



More information about the Digitalmars-d mailing list