Skip to content

This is a small reorg of the new convert code so that we only expose 'simdjson::from' as experimental#2418

Merged
lemire merged 3 commits intomasterfrom
hiding_convert
Aug 15, 2025
Merged

This is a small reorg of the new convert code so that we only expose 'simdjson::from' as experimental#2418
lemire merged 3 commits intomasterfrom
hiding_convert

Conversation

@lemire
Copy link
Member

@lemire lemire commented Aug 15, 2025

This can be changed in a future release, but we don't want our users to start depending on code that we might need to change.

I am also moving the definitions in an -inl.h file, to follow our convention.

…'simdjson::from'.

This can be changed in a future release, but we don't want our users to start depending
on code that we might need to change.
@the-moisrex
Copy link
Member

I would even suggest refraining from exposing from API as well for now.

I never intended for it to be merged into the next release this soon.

If we wanted to change from in a way that's consteval friendly in order to eliminate the necessity of runtime construction of ranges pipeline, then we most-likely have to change the from API as well.

So it would be best if all of these somehow be marked as experimental.

Though, the convert style is quite good even without ranges, but without ranges the name from wouldn't be my first choice.


Also, just brainstorming, can we pull this off too for objects?

Car car;
from(json_car_string)
  ["name"] >> car.name
  ["model"] >> car.model;

@lemire
Copy link
Member Author

lemire commented Aug 15, 2025

@the-moisrex Ok. We shall mark from as experimental.

Note that we have simdjson::to_json. So something like simdjson::from or simdjson::from_json seems warranted.

@lemire lemire changed the title This is a small reorg of the new convert code so that we only expose 'simdjson::from'. This is a small reorg of the new convert code so that we only expose 'simdjson::from' as experimental Aug 15, 2025
@lemire
Copy link
Member Author

lemire commented Aug 15, 2025

@the-moisrex Ok. I have marked simdjson::from as experimental and subject to change.

So we shall be able to change it in a later version.

@lemire lemire merged commit e8ff2fa into master Aug 15, 2025
143 checks passed
@lemire lemire deleted the hiding_convert branch August 15, 2025 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants