On Nov 22, 7:30 am, Sean Corfield seancorfi...@gmail.com wrote:
On Mon, Nov 21, 2011 at 12:50 PM, Alan Malloy a...@malloys.org wrote:
This is way, way faster than using reflection. And all you need in
order to remove the duplication is a macro that does the hinting for
you:
Well, if
Hi !
An interresting point of clojure is that it is dynamically typed. This
for a reason. There is a tradeoff in performance but the benefit is
that the code is shorter, more expressive and reusable.
Type hinting should be exceptionnal and used only in critical areas
when you see a huge boost in
On 11/21/11 7:50 AM, Ralph wrote:
I want to propose that Clojure libraries should be fully type-hinted
-- that is, they should be compiled with the *warn-on-reflection*
option turned on and type hints place wherever possible.
I understand the argument against type-hinting end-user code until a
Nicolas bousque...@gmail.com writes:
An interresting point of clojure is that it is dynamically typed. This
for a reason. There is a tradeoff in performance but the benefit is
that the code is shorter, more expressive and reusable.
Type hinting should be exceptionnal and used only in
I think there is another reasonable case for a type hint. If you've
written a function that is not generic, where one type and only one
type will do, then why not add a type hint as a form of documentation
if nothing else?
On Nov 21, 1:58 pm, Nicolas bousque...@gmail.com wrote:
Hi !
An
I want to propose that Clojure libraries should be fully type-hinted
-- that is, they should be compiled with the *warn-on-reflection*
option turned on and type hints place wherever possible.
I understand the argument against type-hinting end-user code until a
performance problem is demonstrated,
In principle you're right. But you have to keep in mind, that type
hints actually alter runtime behavior.
A hinted call tries to cast its argument into the desired type,
possibly resulting in a type cast exception.
An unhinted call, on the other hand, just looks for the signature.
So in essence
Herwig Hochleitner hhochleit...@gmail.com writes:
Hi Herwig,
In principle you're right. But you have to keep in mind, that type
hints actually alter runtime behavior.
A hinted call tries to cast its argument into the desired type,
possibly resulting in a type cast exception. An unhinted
On Mon, Nov 21, 2011 at 8:12 AM, Tassilo Horn tass...@member.fsf.org wrote:
But is that really an issue? I mean, since you cannot use such duck
typing in Java itself (except in terms of reflection), any method
defined for more than one class with shared, consistent semantics is
declared in
On Nov 21, 12:24 pm, Sean Corfield seancorfi...@gmail.com wrote:
On Mon, Nov 21, 2011 at 8:12 AM, Tassilo Horn tass...@member.fsf.org wrote:
But is that really an issue? I mean, since you cannot use such duck
typing in Java itself (except in terms of reflection), any method
defined for
On Mon, Nov 21, 2011 at 12:50 PM, Alan Malloy a...@malloys.org wrote:
This is way, way faster than using reflection. And all you need in
order to remove the duplication is a macro that does the hinting for
you:
Well, if Clojure/core decide contrib libraries should indeed use
conditional code
11 matches
Mail list logo