Jump to content

DVR vs. Pointer


Recommended Posts

How? I'm interested in hearing the options...

Yes so am I. That's why I said may....

Off the top of my head, any VI that calls to hardware (particularly for measurement or I/O) or any VI expressly written to return data that is either time-sensitive (e.g., salted hash) or random in nature seems like it would qualify as non-hygienic.

Link to comment
Off the top of my head, any VI that calls to hardware (particularly for measurement or I/O) or any VI expressly written to return data that is either time-sensitive (e.g., salted hash) or random in nature seems like it would qualify as non-hygienic.

It depends on whether you call what is essentially a reference call to something during execution (the DAQmx reference is, for all intents and purposes, the same, but the data it represents isn't). If you take your definition of hygenic, that would mean any calls by reference to an external data item in any programming language would make it non-hygenic.

Anyway, we're getting away from the classic definition of hygenic programming, which refers only to macros, or code portions - I think attempting to apply it to a whole programming language in the context of trying to determine if a programming language is hygenic is misguided and of no value, which is why Daklu said that only a pure dataflow programming language can be considered hygenic. I, for one, am glad LabVIEW isn't hygenic. Wait, that didn't come out right...

Link to comment

Anyway, we're getting away from the classic definition of hygenic programming, which refers only to macros, or code portions - I think attempting to apply it to a whole programming language in the context of trying to determine if a programming language is hygenic is misguided and of no value, which is why Daklu said that only a pure dataflow programming language can be considered hygenic. I, for one, am glad LabVIEW isn't hygenic. Wait, that didn't come out right...

That's true - I realized after writing that post that you can always increase or decrease scope and eventually you'll be able to coin something as "hygienic."

Link to comment

How? I'm interested in hearing the options...

My thoughts on hygienic functions code blocks is based solely on the definition AQ supplied. I'd never heard the term before then and I don't know anything about the classic definition of hygienic programming. With that in mind, here's my take on it.

A hygienic block is one that outputs the same values for a given set of inputs regardless of when the block is executed. Blocks that take a reference as an input are non-hygienic. The refnum, not the data it represents, is the input. And as asbo said, anything with time dependent behavior is also non-hygienic.

I think attempting to apply it to a whole programming language in the context of trying to determine if a programming language is hygenic is misguided and of no value

I agree. A purely hygienic language (i.e. does not allow non-hygienic code) would be next to worthless I think, though I freely admit I have no experience with functional languages.

which is why Daklu said that only a pure dataflow programming language can be considered hygenic.

Actually what I was saying is if you accept dataflow and hygiene as synonyms, then LV cannot be considered a pure dataflow language. Like I said above, defining dataflow=hygiene doesn't make sense to me--it confounds unrelated ideas--so in my head I can call G a pure* dataflow language while at the same time agree it is not purely hygienic.

(*"Pure" in this context anyway. It could be that a theoretically pure ("super pure?") dataflow language would allow each output to propagate as soon as it is ready rather than waiting for all outputs to be ready.)

----------------

One interesting aspect of hygiene is it is not necessarily a compounded property. In other words, it is entirely possible for me to construct a hygienic code block in G using parts that are not hygienic. I'm not yet sure how useful that is... it's another way to look at programming I'll have to think about.

Link to comment

One interesting aspect of hygiene is it is not necessarily a compounded property. In other words, it is entirely possible for me to construct a hygienic code block in G using parts that are not hygienic. I'm not yet sure how useful that is... it's another way to look at programming I'll have to think about.

And vice versa so I think this is really a question of scope or scale of definition. Seems kind of like counting dancing angels on pinheads.... ;)

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.