Re: IDL 8.4? [message #89434 is a reply to message #89431] |
Wed, 15 October 2014 10:01  |
chris_torrence@NOSPAM
Messages: 528 Registered: March 2007
|
Senior Member |
|
|
On Wednesday, October 15, 2014 10:44:14 AM UTC-6, rryan%s...@gtempaccount.com wrote:
> Hi Chris and Fabien
>
>
>
> Thanks for the tips. I wasn't criticizing anything, even the choice of moving more OO'ed. Over the years I've grown to appreciate, even prefer objects. I guess I remain bit reluctant to go full object (in IDL) because of limitations with passing objects into IDL_IDLBridge or clunkiness with saving/restoring them and so on. But that's a minor issue.
>
>
>
> I understand the issue with compatability --- If i develop something using a modern tool (such as a hash), then it's never going to work on some older version. But that wasn't my issue. I was asking a bit more rhetorically, what do I gain with these new techniques (such as static methods)? Because I can see what is lost, but I can't see what is gained. This is not to say that nothing is gained, I just was a bit unclear what that was exactly. I can understand that the static methods case is maybe a bit pedantic, because it's a low-level addition designed to facilitate higher-level operations after all the choice to do
>
>
>
> sz= size(var)
>
>
>
> vs.
>
>
>
> sz= var.size()
>
>
>
> is really just a matter of preference and syntax, not one of efficiency or so on (As a note, remember even python has the len() function for this purpose and while it's heralded as a object-oriented many things are still very functional --- which has always annoyed me.)
>
>
>
> I really like the changes and do see them as upgrades. But I just wanted clarification on the upgrades, as I often do work in modest collaborations where we share code and so on. Because if there's clear advantage to certain things (as opposed to conceptual reorganization of existing tools), I want to know about it and encourage co-Is to upgrade from IDL 7.x. That's all I was getting at. Again, I like the more OO'ed nature, for many problems OO is really a superior mindset (graphics, widgets, come to mind).
>
>
>
> All the best gang,
>
> Russell
>
>
>
Hi Russell,
No worries. Sometimes I get a bit defensive (for understandable reasons).
I'll give just two examples of using Lambda that might be interesting:
result = QROMB(LAMBDA(x:x^3 + (x-1)^2 + 3), -4, 4)
p = PLOT(Lambda(x:x^3 + (x-1)^2 + 3), XRANGE=[-4,4], $
/FILL_BACKGROUND, FILL_LEVEL=0)
Finally, as an exercise for the reader: what about using a Lambda as a widget event function (say for a widget_button)?
-Chris
|
|
|