From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
0 Kudos
ToeCutter

Give us 'Generics' in LabVIEW

army.jpg

 

Anyone coming from other languages with generics will need no further explanation- generics offer a great way of simplifying a code base and speeding up development.

 

For those unfamiliar, a generic data type is one that allows you to code a function template without specifying the data type it will process. This allows you to write an algorithm once but use it to process many different types of data. As an example, say you wanted to write a math function to work on any numeric data type without casting; this is a lot of work and you would have to rewrite the function for every numeric type and create a polymorphic boilerplate to call it. Much easier and more maintainable to write it only once for thos of us without 5 pairs of hands.

 

I am aware this post is in danger of being marked a duplicate. I just think I'm stating the case differently from the others- vote for this or vote for one of those I don't care- better still vote for them all!

 

Similar-

http://forums.ni.com/t5/LabVIEW-Idea-Exchange/Provide-a-better-way-to-implement-a-polymorphic-VI/idi...

3 Comments
crossrulz
Knight of NI

I would definately consider this a duplicate of the idea you already linked.  In fact, this idea (Add a generic or adapt-to-datatype control/indicator) was already marked as a duplicate and it already has the generics in the name.

 

Yes, I really think this needs to be done.  It would save a ton of time for reuse libraries.  Just waiting for NI to have that magic breakthrough to figure out how to get it done.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
ToeCutter
Active Participant

@crossrulz-

 

D'oh!

 

Somehow I missed the idea you linked. If I had seen something with generics in the title I wouldn't have bothered. Reckon the original would get even more traffic if the title was changed a little.

 

Fingers crossed here too on the R&D team finding a way..

Darren
Proven Zealot