Re: object(x) rethink
- Posted by jacques deschĂȘnes <desja at ?lob?trotter.net> Mar 03, 2008
- 767 views
Jason wrote: >I dunno. I can see it both ways. But changing the behavior would make it >inconsistent >with integer(x) and sequence(x) unless those, too, returned false for >uninitialized >variables. right >And since procedures are different from variables in Euphoria, I don't know >if "object(func_name)" makes much sense, especially since you can use or wrap >routine_id(). right again Derek wrote: >The assigned() function would return 1 if the symbol has a value, and 0 if it >doesn't. This information is useful so we can tell if we need to initialize >the symbol or not. You already know if you have an uninitialized variable as it generate a runtime error when you try to use it. I'm not convince of the usefullness of assigned(). >...With the possible exception being that a function that >took a routine_id could be able to tell you things about the routine, such is >it a function or procedure, what is name and namespace is, what is parameter >signature is, etc ... to be pedandic ;) in c# and other languages it's called "reflection". Jacques