Ticket #1270 (closed RFC: fixed)

Opened 7 years ago

Last modified 7 years ago

decodetime and decodelocaltime return Array

Reported by: whiteknight Owned by: whiteknight
Priority: normal Milestone: 2.1
Component: core Version: 1.7.0
Severity: medium Keywords: time ops
Cc: Language:
Patch status: Platform:


the decodetime and decodelocaltime ops return an Array PMC, not a FixedIntegerArray or even a ResizableIntegerArray like somebody might expect. Since these two ops always return an array with a fixed size (9 items) and those items are always integers, I think returning a FixedIntegerArray would be better in this case.

I would like to deprecate this feature and fix it after 2.0. Any objections?

Change History

Changed 7 years ago by coke

+0 from me. While I appreciate the desire to use the most restrictive type here, I'm not convinced that the way in which the result is used is worth the hassle of the change. (The *Array types are supposed to be smaller/faster/better - I don't think we have any benchmarks to demonstrate this)

On the other hand, I don't think changing the return type here warrants a deprecation notice. If we return something that 'does array', I think we're fine.

Changed 7 years ago by coke

Additionally, whatever core type we use here, we need to use an HLL-mapped type if one exists. {{[Parrot_get_ctx_HLL_type}}}

Changed 7 years ago by chromatic

  • milestone changed from 2.0 to 2.1

Changed 7 years ago by coke

  • owner set to whiteknight

Changed 7 years ago by whiteknight

  • status changed from new to closed
  • resolution set to fixed

Array PMC is removed in r43695. decodetime and decodelocaltime now return FixedIntegerArray PMCs instead. Closing ticket.

Note: See TracTickets for help on using tickets.