Great language too if you're down with .NET.
Why we're supporting Typed Clojure
31–40 of 77 posts
Re: Why we're supporting Typed Clojure
#32There is already typing in Clojure (and Python and Ruby). It`s called "100% unit test coverage". If you want it, you can have it now.
Re: Why we're supporting Typed Clojure
#33Earlier quoted context omitted.
Indeed. I'm hoping the IDE support will include emacs - it can already do loads of cool things connected to nrepl, but completion on a hash would be amazing.
Does emacs support language aware intelliense (auto complete) for any language? I thought the common case was support through CTAGs.
Re: Why we're supporting Typed Clojure
#34Earlier quoted context omitted.
Indeed. I'm hoping the IDE support will include emacs - it can already do loads of cool things connected to nrepl, but completion on a hash would be amazing.
Does emacs support language aware intelliense (auto complete) for any language? I thought the common case was support through CTAGs.
It's basically the same UX as you're used to in Java, except the info comes from asking the running process, rather than parsing statically.
Re: Why we're supporting Typed Clojure
#35There is already typing in Clojure (and Python and Ruby). It`s called "100% unit test coverage". If you want it, you can have it now.
Re: Why we're supporting Typed Clojure
#36Earlier quoted context omitted.
Does emacs support language aware intelliense (auto complete) for any language? I thought the common case was support through CTAGs.
It does for several languages (Dylan, Common Lisp, Java, etc). If you've got a compiler with an API, like say Clang, you can talk to it from Emacs Lisp.
Re: Why we're supporting Typed Clojure
#37Earlier quoted context omitted.
What do you mean?
I'd like to see your defintion of structural typing in PHP. (Hint: Not casts, not lots of manual gettype)
$f = function helloAction(Http\Request $request) {
$response = new Http\Response("Hello " . $request->query->get('name'), 200);
$response->setMa // at this point the IDE will show a list of methods like 'setMaxAge($time)', because it knows its type
};
Now I can pass $f somewhere else, like this: $someObject->someMethod($f);
And the method can accept it like this: protected method someMethod($f) {} // no checks!
Or like this: protected method someMethod(\Closure $f) {} // only an argument of type Closure will be accepted.
So those are types for me. If you are asking for something like this: Response $r = new Response(...);
Then yeah, PHP doesn't have that. Though I don't know why we would want that, it's kind of redundant.Re: Why we're supporting Typed Clojure
#38Earlier quoted context omitted.
Autocompletion on the keys of a hash.
I know that in several communities, "hash" and "hash map" are synonymous. However, in Clojure hash maps are only one of several map implementations. We have implementations backed by linear array scans, prefix trees, and other data structures too. The word "hash" a shorthand for the noun-phrase "hash code" (aka "digest") and a verb for the process of creating hash codes.
Re: Why we're supporting Typed Clojure
#39Earlier quoted context omitted.
I'd like to see your defintion of structural typing in PHP. (Hint: Not casts, not lots of manual gettype)
I don't have a definition, I just use the thing. That's why I'm asking, I'm not a computer scientist. Eg: $f = function helloAction(Http\Request $request) { $response = new Http\Response("Hello " . $request->query->get('name'), 200); $response->setMa // at this point the IDE will show a list of methods like 'setMaxAge($time)', because it knows its type }; Now I can pass $f somewhere else, like this: $someObject->some…
Re: Why we're supporting Typed Clojure
#40I still don't think this is worth supporting if you don't use Clojure. As far as dynamic languages go, I already use Racket quite a bit and as mentioned I can just use Typed Racket if I want, or I can use Racket's excellent contract system for some things (sparingly if I need good performance). Also I doubt it will catch on in the Python community, which is hostile to this sort of thing. JavaScript is perhaps a good…