40ants/teddy

Overly strict type inference?

Opened this issue · 3 comments

The following throws an error that 0 is not a single-float:

(TEDDY/DATA-FRAME::MAKE-DATA-FRAME
   '("subject" "time" "conc")
   :ROWS '(("1" 0.5 0.94) ("1" 0 0.78)))

Perhaps we should be a bit more flexible with the types of values passed to make-data-frame?

I think that being strict on typing makes sense. However, here you would need to scan for the common type, and it seems to be complicated? Why even bother, either assume T or expect explicit type information.

I'm not quite sure what you're suggesting. My take is that the example I provided should work. If I were to supply a type, sure, use that, but if I don't, don't just use the type of the first seen element. I guess there's a use case for that but the default should be more developer/user-friendly IMO.

I am suggesting that everything should be assumed to be T, unless the explicit type is provided by the user (which is what CL ordinarily does in most places).