Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork23
read-line function#154
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
I didn't find any function to read from the console, for example. I think it would be nice to have a read-line function, something like
Extra: What do you think,@jenshaase? 🤔 |
BetaWas this translation helpful?Give feedback.
All reactions
Regarding(read-line):
You can use(php/readline) if you haveext-readline installed. I will not wrap this function in the core library because it requires a extension.
Regarding an io:
In the clojure / Java world it makes sense to wrap thejava.io library because it is well defined and used very often in a lot of code. In PHP the io utils are much simpler. I would recommend to use them directly (e.g.(php/file_get_contents "path/to/file") or(php/file_put_contents "path/to/file" "content")). However, if you have a cool idea on how to make a very good io library you can just create a library for it in an extra repository.
In general I want to keep the core library of Phel small. I would l…
Replies: 1 comment 1 reply
-
Regarding You can use Regarding an io: In the clojure / Java world it makes sense to wrap the In general I want to keep the core library of Phel small. I would like to focus on stuff that requires as common specification (like the request and response object) or very general functions and macros. Moving libraries in extra repositories has also the benefit that new versions can be published independently from the compiler. |
BetaWas this translation helpful?Give feedback.
All reactions
👍 1
-
Right! I think what I was missing was some examples and some help about how to use some basic IO, but you just told me with your examples. |
BetaWas this translation helpful?Give feedback.