Jump to content

Jason Goepel

Member Since 15 May 2013
Offline Last Active Today, 07:20 AM

Posts I've Made

In Topic: Left-to-right Evaluation of opEquals method.

27 February 2017 - 09:44 AM

Even in the case where an opEquals method takes a constant reference to an argument, the compiler will create a copy.  For large objects, this seems wasteful in the common case.  Would you consider a library, compile-time setting to not ensure left-to-right evaluation?  This would allow script writers to treat "==" like a direct call to opEquals.


In C++ all the overloaded operators in a class evaluate the argument list first, effectively making them evaluate right-to-left.  I understand that AngelScript already differs from C++ in the handling of operators, and some of those differences may justify an "always left-to-right" evaluation requirement. For instance, with a single opEquals overload, AngelScript will allow comparisons using that object when it appears on either the right or left side of the "==" operator; C++ only compiles if the object is on the left.

In Topic: Assigning property without a setter

20 October 2016 - 07:11 AM

You have only written a property "getter."  You need to write a property "setter" to get the name property to handle an assignment operator.


void set_name(TName value);

In Topic: Unsafe const &in

28 September 2015 - 12:25 PM

I think my browser had some trouble with the file uploader.

In Topic: Unsafe const &in

28 September 2015 - 08:42 AM

I have followed your suggestion and changed const &in to become const &inout.


I do find the automatic construction of a temporary variable passed to a const &inout parameter useful, so I have attempted a modification to make that work.  I have attached it as a patch.  It seems to work in my tests, but I am not sure if I am properly handling all cases.  If you don't incorporate this change officially, would you mind looking it over to see if I missed anything obvious to you?



In Topic: "Null pointer access" putting object type in exception info

02 April 2015 - 08:26 AM

I'm going to try and hack something together.  My immediate purpose may be satisfied by adding more exception information when the exception is set within "CallSystemFunction."  I'll let you know if I come up with anything clever.