Difference between []New and .New

Writing and using Classes in Dyalog APL
Post Reply
RobertB
Posts: 15
Joined: Fri Aug 27, 2010 7:16 am

Difference between []New and .New

Post by RobertB »

Hello,

we are using Dyalog 12.0 in our Web-Applications.
Is there a difference in creating an object with []New and .New?
Both is working.

Example:
DateTime.New 2012 11 22
[]New DateTime 2012 11 22

Regards
Robert
Vince|Dyalog
Posts: 439
Joined: Wed Oct 01, 2008 9:39 am

Re: Difference between []New and .New

Post by Vince|Dyalog »

Hi Robert,

We recommend using the ⎕new way.

In the end, they are the same but there is potential for a clash if the class already had it's own New method.

Regards,

Vince
RobertB
Posts: 15
Joined: Fri Aug 27, 2010 7:16 am

Re: Difference between []New and .New

Post by RobertB »

Thanks Vince
Post Reply