Feature #138

avatar

Improve automatic param conversion of funcitons

Added by Ash Berlin 278 days ago. Updated 226 days ago.

Status:New Start:10/24/2009
Priority:Normal Due date:
Assigned to:avatarAristid Breitkreuz % Done:

0%

Category:C++-API
Target version:0.10

Description

I think how function params are treated needs a bit of tidying:

  1. Optional params should use boost::optional, otherwise they are required
  2. The number of params passed to a function must be at least as many as the required params
    • This would mean that (value x, optional< value > y, value z) would be invalid. If this is too hard to do, then just make the last param be optional too.
    • But you can pass more than the number of formal params, even if we can't access them (without using a call_context)- this is just how JS works
  3. An (explicit or implicit) undefined should not be accepted for anything but a value typed param (See #127)

Related issues

related to Bug #137 encodings.convertFromString (and ToString) need better errors Closed 10/24/2009
related to Bug #127 automatic function params accepting numbers as objects (assert issues) Closed 10/06/2009
related to Feature #12 Evaluate conversion API Assigned 03/29/2009

History

Updated by Aristid Breitkreuz 231 days ago

avatar
  • Target version changed from 0.9 to 0.10

Updated by Ash Berlin 226 days ago

avatar

I just got bit by the 3rd point above - expecting an object and it happily accept undefined confusing the crap out of me.

Also available in: Atom PDF