Dyalog added .New method vs ⎕NEW

Using (or providing) Microsoft.NET Classes

Dyalog added .New method vs ⎕NEW

Postby AndyS|Dyalog on Fri Aug 16, 2013 12:56 pm

When .Net support was originally added to Dyalog APL (back in Version 9.5), the ⎕NEW system function did not exist. Instead, the user was expected to use the .New method which comes as part of many .Net objects. For those objects which did not include a .New method, the interpreter "added" one so that it was possible to instantiate instances of such objects.

We believe that very few - if any - users make use of these interpreter-added .New methods and are therefore considering removing the feature. If we were to do this, then we would announce its removal with the release of 14.0, and then remove from 14.1 onwards.

If this change would affect you, please can you let Dyalog know.
User avatar
AndyS|Dyalog
 
Posts: 257
Joined: Tue May 12, 2009 6:06 pm

Re: Dyalog added .New method vs ⎕NEW

Postby MikeHughes on Sat Aug 17, 2013 7:15 am

I support the removal and can give a case where the removal would be beneficial.

When using WPF, the "added" .New conflicts with the standard WPF Command ApplicationCommands.New preventing the use of the New command which is confusing (and annoying) for anyone using WPF with Dyalog APL.

So the sooner it is removed the better :-)
User avatar
MikeHughes
 
Posts: 86
Joined: Thu Nov 26, 2009 9:03 am
Location: Market Harborough, Leicestershire, UK

Re: Dyalog added .New method vs ⎕NEW

Postby Dick Bowman on Mon Aug 19, 2013 4:01 pm

I'm feeling a trifle ambivalent...

On the one hand I like .New because it seems to make things simpler and/or more consistent - I'd like to be able to make all new things one way.

Of the two...

d←⎕NEW DateTime (3↑⎕TS)
d←DateTime.New 3↑⎕ts

I prefer the latter - it seems less "fussy" (although I also confess to not using it very much).

But on the other hand having Dyalog "meddle" with what comes out of the .Net box seems unfortunate. It would be useful to see examples of where Dyalog has added this non-included method (specifically, what do the Visual Studio programmers do when they need to make new things and there is no New method? - because transliterating VS examples seems to be becoming a required skill).

While with my third hand I wonder about the inconsistency illustrated by...

f←⎕new 'Form' ''
d←⎕NEW DateTime (3↑⎕TS)

Where some things need their name enquoted, while others are recognised au naturel.
Visit http://apl.dickbowman.com to read more from Dick Bowman
User avatar
Dick Bowman
 
Posts: 235
Joined: Thu Jun 18, 2009 4:55 pm

Re: Dyalog added .New method vs ⎕NEW

Postby Tomas Gustafsson on Sat Nov 22, 2014 10:06 pm

Sorry for digging up this old topic, but

Image
(picture above - if missing, i've deleted it from the server)

Yep :-)
Tomas Gustafsson
 
Posts: 101
Joined: Mon Sep 19, 2011 6:43 pm


Return to Microsoft.NET

Who is online

Users browsing this forum: No registered users and 1 guest