Julia vs. D?

Mason McGill via Digitalmars-d digitalmars-d at puremagic.com
Wed May 7 00:27:41 PDT 2014


On Tuesday, 6 May 2014 at 21:00:18 UTC, bearophile wrote:
> The language tries its best to be flexible as a dynamic 
> language. But variables never carry a run-time type tag, unlike 
> in Lisp.

Hmm... Then how can I do this:

   x = 5
   typeof(x) # evaluates to "Int64"
   x = 5.0
   typeof(x) # evaluates to "Float64"

?

Is Julia doing something trickier than I think it is? Or do you 
just mean they don't carry type tags after compilation?


More information about the Digitalmars-d mailing list