Amber icon indicating copy to clipboard operation
Amber copied to clipboard

[Feature] Create `len` builtin

Open Ph0enixKM opened this issue 1 year ago • 2 comments

Is your feature request related to a problem? Please describe. There was a problem with len function - where to put it, because it fits well in std/text and std/array. The len function is so atomic that should be implemented as a built-in.

Describe the solution you'd like

  • [ ] Create a new module len
  • [ ] Add deprecation warning to the len function in std/text

Describe alternatives you've considered Moving len to std/core. This would complicate things even more.

Additional context N/A

Ph0enixKM avatar Sep 02 '24 21:09 Ph0enixKM

maybe we should have them tree shaken away if they're not used instead of a compile flag? im pretty sure that's what happens now when you import *

about redefining them - i dont think its a good idea to allow it at all. it seems like something very dirty and confusing.

b1ek avatar Sep 03 '24 02:09 b1ek

In my opinion should be a builtin because it is confusing otherwise the developer is enough to import everything from all the std to be sure to have anything.

Mte90 avatar Sep 03 '24 08:09 Mte90