ShaunR Posted March 14, 2017 Report Share Posted March 14, 2017 (edited) 39 minutes ago, ned said: For example, generics allow you to write a sorting algorithm that takes a list, and a comparison function that operates on elements of that list. The compiler verifies that the comparison function matches the list element type, so you can't have a run-time type mismatch. This can be done in a VIM because the comparison primitives' adapt to type so all that is needed is for the controls and indicators on the VI to do the same. Do you have another example? 2 hours ago, Tomi Maila said: ShaunR, the List type in your example is not strongly typed but generic. That means the type of the list wire for a list of Strings is not different from the type of the list wire for the list of DBLs. That's the exact problem type parameters would solve. That's because variants are run-time evaluated even though we have to stipulate how to deference them with the Variant To Data primitive. Wouldn't a "To Variant" that could be configured much the same way control refs have the option to "Include Data" to make them "Strict" be more intuitive and easier? After all. Variants do contain the type already, it just doesn't get propagated at design time. The bonus would be we wouldn't need the "Variant To Data" 99% of the time at all. Edited March 14, 2017 by ShaunR Quote Link to comment
Aristos Queue Posted June 5, 2017 Report Share Posted June 5, 2017 On 3/14/2017 at 1:26 PM, ned said: Right now you can't do this in LabVIEW. Welcome to LabVIEW 2017. It'll be even better in 2017 SP1, but this works for now. 2 Quote Link to comment
0_o Posted June 6, 2017 Report Share Posted June 6, 2017 Nice! Does it mean that in the background LVOOP started supporting multiple inheritance and one day it will become available to us all? Quote Link to comment
Aristos Queue Posted June 6, 2017 Report Share Posted June 6, 2017 13 hours ago, 0_o said: Nice! Does it mean that in the background LVOOP started supporting multiple inheritance and one day it will become available to us all? What? There's nothing about OO in the picture I posted. Quote Link to comment
0_o Posted June 7, 2017 Report Share Posted June 7, 2017 I understand. Any chance LV NXG will support multiple inheritance? Quote Link to comment
Aristos Queue Posted June 12, 2017 Report Share Posted June 12, 2017 On 6/7/2017 at 4:14 AM, 0_o said: I understand. Any chance LV NXG will support multiple inheritance? None whatsoever while I'm working here. Quote Link to comment
Aristos Queue Posted June 12, 2017 Report Share Posted June 12, 2017 Just now, Aristos Queue said: None whatsoever while I'm working here. Following up on that: http://www.ni.com/white-paper/3574/en/ Search for "multiple inheritance". Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.