Good evening Clint,

I'll download the latest svn shortly and test. Thank you.

Jafar,

Thanks for both of your examples. I'll review my code and implement the change. This is a useful technique that I had forgotten about (I read about it in some of the Unicon documentation I have). I think it was in connection with building a try-catch structure.

regards to all.

Bruce Rennie

On 19/04/13 12:46, Clinton Jeffery wrote:
Bruce,

It would be relatively trivial to make classname() fail instead of die, if given a non-object. In fact, since I can't imagine any program depending on the old semantics, I went ahead and committed the change to SVN. I expect it will make it out into Windows binaries next time they are built.

As far as whether there should be a more efficient way to do what you are doing, Jafar's method is fine. There is a legitimate question as to whether all objects' type() should have a __state suffix or if the language should report type(obj) as == _classname, so what you are doing might change if we decide to change the language on that point.


On Thu, Apr 18, 2013 at 6:54 AM, Bruce & Breeanna Rennie <bren...@dcsi.net.au <mailto:bren...@dcsi.net.au>> wrote:

    Clint and Jafar,

    How much effort would it be to change the behaviour of the function
    "classname" to fail on a non-class value instead of aborting the
    program? Are there any of the other functions that would be better off
    failing instead of aborting?

    In its current form it is just about useless for writing generalised
    code using it. I am finding that a routine using type gives me more
    generic results.

    regards

    Bruce Rennie.

    
------------------------------------------------------------------------------
    Precog is a next-generation analytics platform capable of advanced
    analytics on semi-structured data. The platform includes APIs for
    building
    apps and a phenomenal toolset for data science. Developers can use
    our toolset for easy data analysis & visualization. Get a free
    account!
    http://www2.precog.com/precogplatform/slashdotnewsletter
    _______________________________________________
    Unicon-group mailing list
    Unicon-group@lists.sourceforge.net
    <mailto:Unicon-group@lists.sourceforge.net>
    https://lists.sourceforge.net/lists/listinfo/unicon-group



------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Unicon-group mailing list
Unicon-group@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/unicon-group

Reply via email to