Skip to content

Commit

Permalink
docs: provide more detail on some noteworthy differences with Common …
Browse files Browse the repository at this point in the history
…Lisp (#36685)
  • Loading branch information
bobcassels committed Apr 21, 2021
1 parent d294b25 commit 33e9d37
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion doc/src/manual/noteworthy-differences.md
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,13 @@ For users coming to Julia from R, these are some noteworthy differences:

- The typical Julia workflow for prototyping also uses continuous manipulation of the image, implemented with the [Revise.jl](https://github.com/timholy/Revise.jl) package.

- Bignums are supported, but conversion is not automatic; ordinary integers [overflow](@ref faq-integer-arithmetic).
- For performance, Julia prefers that operations have [type stability](@ref man-type-stability). Where Common Lisp abstracts away from the underlying machine operations, Julia cleaves closer to them. For example:
- Integer division using `/` always returns a floating-point result, even if the computation is exact.
- `//` always returns a rational result
- `÷` always returns a (truncated) integer result
- Bignums are supported, but conversion is not automatic; ordinary integers [overflow](@ref faq-integer-arithmetic).
- Complex numbers are supported, but to get complex results, [you need complex inputs](@ref faq-domain-errors).
- There are multiple Complex and Rational types, with different component types.

- Modules (namespaces) can be hierarchical. [`import`](@ref) and [`using`](@ref) have a dual role: they load the code and make it available in the namespace. `import` for only the module name is possible (roughly equivalent to `ASDF:LOAD-OP`). Slot names don't need to be exported separately. Global variables can't be assigned to from outside the module (except with `eval(mod, :(var = val))` as an escape hatch).

Expand Down

0 comments on commit 33e9d37

Please sign in to comment.