Re: Add support for seq on Java streams?

2019-04-13 Thread Matching Socks
Another Java innovation (from back in Java 6) that could benefit from interop support is varargs. The Java compiler automatically passes arguments with an array, but the Clojure compiler does not. That's CLJ-440. But I do not find a Jira ticket (https://dev.clojure.org/jira/) related to seq

Re: Add support for seq on Java streams?

2019-04-12 Thread Alex Miller
We have been looking at how to provide default interop for some of the function APIs, and this seems equally interesting now. I don’t recall a ticket for this in particular so feel free to make one. Needs some assessment of course. -- You received this message because you are subscribed to the

Re: Add support for seq on Java streams?

2019-04-12 Thread Juraj Martinka
Since now the minimum required Java version is 8 (I believe) is there any plan to implement this in core? On Tuesday, 23 February 2016 18:06:48 UTC+1, Alex Miller wrote: > > It may, however keep in mind that Clojure supports Java 1.6+ and Stream > was added in 1.8. That's not an impossible

Re: Add support for seq on Java streams?

2016-02-25 Thread 676c7473
Very interesting. This covers a grab bag of exactly the stuff that’s been bothering me. Thanks, Andrew. -- David Am Donnerstag, 25. Februar 2016 00:53:15 UTC+1 schrieb Andrew Oberstar: > > If you want to use reduce or transducers on a stream, you could take a > look at ike.cljj (shameless

Re: Add support for seq on Java streams?

2016-02-24 Thread Andrew Oberstar
If you want to use reduce or transducers on a stream, you could take a look at ike.cljj (shameless plug). Depending on your use case, it might not provide a lot of benefit over Gary's suggestion. https://github.com/ike-tools/ike.cljj Andrew Oberstar On Wed, Feb 24, 2016 at 7:07 AM

Re: Add support for seq on Java streams?

2016-02-24 Thread 676c7473
Thanks, Alex and Gary. I understand that Java 8 is not yet on the roadmap, so iterator-seq seems like the best solution. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts

Re: Add support for seq on Java streams?

2016-02-24 Thread Gary Verhaegen
In the mean time, you can probably get pretty far with the java.util.stream.BaseStream#iterator method and the clojure.core/iterator-seq function. On Tuesday, 23 February 2016, Alex Miller wrote: > It may, however keep in mind that Clojure supports Java 1.6+ and Stream >

Re: Add support for seq on Java streams?

2016-02-23 Thread Alex Miller
It may, however keep in mind that Clojure supports Java 1.6+ and Stream was added in 1.8. That's not an impossible hurdle, but it might make sense to make longer before hurdling it. On Tuesday, February 23, 2016 at 11:03:55 AM UTC-6, 676c7...@gmail.com wrote: > > Hello! > > For interoperation

Add support for seq on Java streams?

2016-02-23 Thread 676c7473
Hello! For interoperation with Java, Clojure’s seq supports the Iterable interface directly, which means that all Java collections are automatically seqable. seq also supports the CharSequence and java.util.Map interfaces, and arrays too. Would it make sense to have seq also support