Re: Re[2]: Multitask Feedback
- Posted by D. Newhall <derek_newhall at yahoo.com> Sep 24, 2005
- 441 views
akusaya wrote: > (snip) > > Again, and again, how about a feature to ignore return values after > calling a function? It's really annoying, almost every time I make a > little Eu program I need to do something like > > PP = seek(fn, 100) > > where PP is a global variable I defined in aku.e which is an include > file I always include when starting to write a new Eu program. (almost > never write a Eu program without an "include"!) > > All languages I know allow ignoring function return values. Why not > Eu? > > (BTW, I tried making a website with PHP, unexpectedly it's not a lot > harder than using Eu, but much easier since it has rich functions and > database access functions) > Well, functions return values for a reason and it's not that hard to ignore a return value. Is it annoying? At times, yes. Worth adding some language construct to the langauge to remedy it? Definitely not. Here, this is what I use:
procedure ignore(object x) -- Do nothing, just ignore the object passed end procedure -- ignore ignore( seek(fn, 100) )
It's not that hard to implement and use, looks neat and clear, and most importantly doesn't change Euphoria in any way. The Euphoria Standard Library project : http://esl.sourceforge.net/ The Euphoria Standard Library mailing list : https://lists.sourceforge.net/lists/listinfo/esl-discussion