On Dec 13, 5:24 am, ajay gopalakrishnan wrote:
> It tried the following in REPL and got no error. Personally, I feel that I
> should get an error because calling square on strings is wrong in both
> cases.
>
> Is there a way out of this in Clojure?
I hope you don't mind me bumping this old thread
On Tue, Dec 15, 2009 at 9:11 AM, Garth Sheldon-Coulson wrote:
> OTOH, when Rich gave a talk at MIT recently he mentioned he wasn't terribly
> interested in type systems for Clojure apart from (potentially) a simple
> binary type system to distinguish I/O-side-effecty things from
> non-I/O-side-ef
If Clojure type checking becomes a frequent request/complaint, please
build a lint type tool, not some twisted logic embedded in the
compiler :)))
C did not have any decent type checking when it came out and we had to
use lint to find bad parameter on fn calls and other similar errors.
They were n
On Tuesday 15 December 2009 06:21 PM, ajay gopalakrishnan wrote:
> Oh ... I know all that. What I wanted to know is that is there any way
> to FORCE compile time checking by providing some flag or the other to
> Clojure compiler. If not, I guess a good set of test cases is the only
> way to fix it.
On Dec 15, 1:23 pm, Baishampayan Ghose wrote:
> PS - If you are worried about "compile time type checking", I think it's
> prudent to mention now that Clojure is a dynamically typed programming
> language where types are checked at run-time and not compile time.
Actually, there are Common Lisp co
OTOH, when Rich gave a talk at MIT recently he mentioned he wasn't terribly
interested in type systems for Clojure apart from (potentially) a simple
binary type system to distinguish I/O-side-effecty things from
non-I/O-side-effecty things. He also mentioned something extremely
interesting about wa
2009/12/15 ajay gopalakrishnan
> Oh ... I know all that. What I wanted to know is that is there any way to
> FORCE compile time checking by providing some flag or the other to Clojure
> compiler. If not, I guess a good set of test cases is the only way to fix
> it. (Good test cases are always rec
Oh ... I know all that. What I wanted to know is that is there any way to
FORCE compile time checking by providing some flag or the other to Clojure
compiler. If not, I guess a good set of test cases is the only way to fix
it. (Good test cases are always recommended, it's just that in this case it
Ajay,
> It tried the following in REPL and got no error. Personally, I feel that
> I should get an error because calling square on strings is wrong in both
> cases.
>
> Is there a way out of this in Clojure?
>
> |(defn square[n] (* n n))
>
> (if (= 0 0) (println"hello") (map square["a" "b"
It tried the following in REPL and got no error. Personally, I feel that I
should get an error because calling square on strings is wrong in both
cases.
Is there a way out of this in Clojure?
(defn square [n] (* n n))
(if (= 0 0) (println "hello") (map square ["a" "b"]))
The following gives erro
10 matches
Mail list logo