Re: Dylan vs Julia
mikel evins <[email protected]> Fri, 14 Feb 2014 17:04:09 -0600
| Newsgroups | gmane.comp.lang.dylan.gwydion.devel |
|---|---|
| Message-ID | <[email protected]> |
On Feb 14, 2014, at 4:29 AM, Gour <[email protected]> wrote: > I'm not interested neither for Lisp nor for Fortress (which anyway seems > to be not alive), but wonder how does Julia compare with Dylan in > general. > > Afaik, one of the differences is that Julia JIT-ed, while Dylan produces > native executables which might impact the performance for end user. > > Anything else which might be important to know and/or some reasons why > the creators of Julia were not e.g. happy with Dylan (amongst many other > languages) and pursued designing Julia? > > In the past I was playing with Haskell, but found that there is too much > monad talk and the language had too steep learning curve for some of > potential contributors to the project - multi-platfom GUI (desktop) app. > > Later I was evaluating D, Ada, OCaml, F#, Nimrod, Rust...some are nice > languages, but most are lacking bindings for developing GUI desktop > applications and/or are more suitable as 'system' and not 'general > programming' language, iow. fiddling with low(er)-level stuff like > pointers etc. - we want to avoid C(++) - or have strange syntax like Rust. > > Iow. we're looking for some 'general programming' language suitable for > desktop app which is has good-enough performance and provide more > type-safety than e.g. Python (we have to call 3rd party lib for > computing planetary ephemeris and would like to use sqlite3 as app's > storage format). > > I saw a thread which 'claimed' that e.g. Julia is e.g not quicker than > Python/Cython although it seems it was due usage of int32, but wonder > what could one expect from Dylan? > > So, anyone somewhat familiar with boh Julia & Dylan can share what would > be some of Dylan's pros in comparison with the Julia? > > Are there some major features missing in either language which I am not > seeing or the two can't be easily compared at all? As languages, Julia and Dylan are strikingly similar. The Julia maintainers have said that's because they have mostly the same influences, rather than because of any deliberate intention to imitate Dylan. Both are dynamically-typed compiled languages with polymorphic functions that support multiple dispatch. Both have Lisp-like macro systems implemented in a language with a conventional infix syntax. Their syntax is different, of course. Dylan's syntax is broadly Pascal-like; Julia's is broadly Matlab-like. Julia's definition includes primitives for parallel and distributed computations; Dylan's doesn't. For distributed and concurrent programming in Dylan you must rely on whatever libraries are available, or write one yourself. Julia supports parametric polymorphism. Lifting an example from the Julia docs, you can define a type like this: type Point{T} x::T y::T end The type is called a parametric or parametrized type because part of its definition is a type parameter--in this case type T. Type T can be any type you like (but it has to be the same type in both x and y). That means that Point{T} is now actually a family of types like Point{Int64}, Point{Float64}, and Point{String}. Julia functions can be specialized on any of these types, or on Point{T}. Dylan does not have this feature. On the other hand, Dylan does have limited types, which enable you to achieve many of the same effects. As an example, you can't express the equivalent in Dylan of the Julia Vector{Integer}, but you can define a limited type like this: define constant <integer-vector> = limited(<vector> of <integer>); You can then specialize functions on <integer-vector>, achieving the same effect as using Julia's Vector{Integer}. Julia's parametric types are probably strictly more expressive, because they are generic; you can use them with arbitrary types. In Dylan you have support only for those types that the implementation supports as limited types, and you can make only those limitations that the implementation provides. On the other hand, if your use-case matches the features of your Dylan implementation then Julia's parametric types offer no unique advantage for that case. _______________________________________________ hackers mailing list [email protected] https://lists.opendylan.org/mailman/listinfo/hackers