asbo Posted October 18, 2011 Report Share Posted October 18, 2011 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. Quote Link to comment
crelf Posted October 18, 2011 Report Share Posted October 18, 2011 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... Quote Link to comment
asbo Posted October 18, 2011 Report Share Posted October 18, 2011 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." Quote Link to comment
crelf Posted October 18, 2011 Report Share Posted October 18, 2011 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." We're stilling talking about programming, right? Quote Link to comment
Daklu Posted October 18, 2011 Author Report Share Posted October 18, 2011 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. Quote Link to comment
asbo Posted October 19, 2011 Report Share Posted October 19, 2011 We're stilling talking about programming, right? I like to think of it as a guiding life principle, actually. Quote Link to comment
Val Brown Posted October 23, 2011 Report Share Posted October 23, 2011 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.... 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.