--
You received this message because you are subscribed to the Google Groups "Clojure Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure-dev...@googlegroups.com.
To post to this group, send email to cloju...@googlegroups.com.
Visit this group at https://groups.google.com/group/clojure-dev.
For more options, visit https://groups.google.com/d/optout.
I cannot speak for the Clojure core developers, but I would guess that they might point out that the Clojure run time most likely provides all of the information needed to generate such a suggestion (e.g. see the definition of the "apropos" function), and to hook into examining the causes of exceptions in a REPL. For example, see the talk "REPL-Driven Development" by Stuart Halloway. A transcript and link to video recording is here: https://github.com/matthiasn/talk-transcripts/blob/master/Halloway_Stuart/REPLDrivenDevelopment.mdAndy
On Wed, Sep 12, 2018 at 1:42 AM Pankaj Doharey <pankaj...@gmail.com> wrote:
I am a former rubyist, and in ruby there is this feature called "Did you mean?"
For instance :
irb(main):001:0> s = 'helloworld'.spli(//)
Traceback (most recent call last):
2: from /Users/xxxx/.rbenv/versions/2.6.0-dev/bin/irb:11:in `<main>'
1: from (irb):1
NoMethodError (undefined method `spli' for "helloworld":String)
Did you mean? split
irb(main):002:0> s = 'helloworld'.split(//)
=> ["h", "e", "l", "l", "o", "w", "o", "r", "l", "d"]
Something similar in clojure would be :
user=> (str/split "helloworld" #"")
CompilerException java.lang.RuntimeException: No such var: clojure.string/spli, c ...
Did you mean? (str/split ...
Usually the Did you mean would be in some error color, I think this could be a nice feature for beginners to have method suggestions. and aesthetically just nice.
Do you think it could be a worthy addition to the clojure ecosystem ? It isnt a very difficult suggestion to implement only one file would be touched Compiler.java and tests files. Doesnt require many changes if we consider we moving with this.
--
You received this message because you are subscribed to the Google Groups "Clojure Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure-dev+unsubscribe@googlegroups.com.
To post to this group, send email to cloju...@googlegroups.com.
Visit this group at https://groups.google.com/group/clojure-dev.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Clojure Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure-dev+unsubscribe@googlegroups.com.
Yeah, I don't think this needs to be in core. I suspect this is probably mostly covered by existing libs already, like clojure-complete (https://github.com/ninjudd/clojure-complete).
On Wed, Sep 12, 2018 at 10:21 AM, Andy Fingerhut <andy.fi...@gmail.com> wrote:
I cannot speak for the Clojure core developers, but I would guess that they might point out that the Clojure run time most likely provides all of the information needed to generate such a suggestion (e.g. see the definition of the "apropos" function), and to hook into examining the causes of exceptions in a REPL. For example, see the talk "REPL-Driven Development" by Stuart Halloway. A transcript and link to video recording is here: https://github.com/matthiasn/talk-transcripts/blob/master/Halloway_Stuart/REPLDrivenDevelopment.mdAndy
On Wed, Sep 12, 2018 at 1:42 AM Pankaj Doharey <pankaj...@gmail.com> wrote:
I am a former rubyist, and in ruby there is this feature called "Did you mean?"
For instance :
irb(main):001:0> s = 'helloworld'.spli(//)
Traceback (most recent call last):
2: from /Users/xxxx/.rbenv/versions/2.6.0-dev/bin/irb:11:in `<main>'
1: from (irb):1
NoMethodError (undefined method `spli' for "helloworld":String)
Did you mean? split
irb(main):002:0> s = 'helloworld'.split(//)
=> ["h", "e", "l", "l", "o", "w", "o", "r", "l", "d"]
Something similar in clojure would be :
user=> (str/split "helloworld" #"")
CompilerException java.lang.RuntimeException: No such var: clojure.string/spli, c ...
Did you mean? (str/split ...
Usually the Did you mean would be in some error color, I think this could be a nice feature for beginners to have method suggestions. and aesthetically just nice.
Do you think it could be a worthy addition to the clojure ecosystem ? It isnt a very difficult suggestion to implement only one file would be touched Compiler.java and tests files. Doesnt require many changes if we consider we moving with this.
--
You received this message because you are subscribed to the Google Groups "Clojure Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure-dev...@googlegroups.com.
To post to this group, send email to cloju...@googlegroups.com.
Visit this group at https://groups.google.com/group/clojure-dev.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Clojure Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure-dev...@googlegroups.com.
To post to this group, send email to cloju...@googlegroups.com.
Visit this group at https://groups.google.com/group/clojure-dev.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Clojure Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure-dev...@googlegroups.com.