- # Return atan2l(self, x) from libmath
- fun atan_with(x: Int): Float `{
- return atan2(self, x);
- `}
-
- # This method callback to Nit methods from C code
- # It will use from C code:
- # * the local fib method
- # * the + operator, a method of Int
- # * to_s, a method of all objects
- # * String.to_cstring, a method of String to return an equivalent char*
+ # Print the result of adding `self` to `self.fib` with callbacks from C
+ #
+ # This method illustrates many forms of callbacks from C,
+ # but it would have been better implemented in Nit (as done by `bar`).
+ #
+ # It is recommended to avoid callbacks when possible, use each language according to their strengths.
+ # Nit is better than C to call methods and manipulate objects.
+ # C has easy access to system functions, native libraries and it does low-level stuff.
+ #
+ # The implementation calls:
+ # * the local `fib` method,
+ # * the `+` operator, a method of `Int`,
+ # * `to_s`, a method of all objects,
+ # * `String.to_cstring`, a method of `String` to get as a `char*`.