Skip to content

Commit 33e9d37

Browse files
authored
docs: provide more detail on some noteworthy differences with Common Lisp (#36685)
1 parent d294b25 commit 33e9d37

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

doc/src/manual/noteworthy-differences.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,13 @@ For users coming to Julia from R, these are some noteworthy differences:
353353

354354
- 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.
355355

356-
- Bignums are supported, but conversion is not automatic; ordinary integers [overflow](@ref faq-integer-arithmetic).
356+
- 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:
357+
- Integer division using `/` always returns a floating-point result, even if the computation is exact.
358+
- `//` always returns a rational result
359+
- `÷` always returns a (truncated) integer result
360+
- Bignums are supported, but conversion is not automatic; ordinary integers [overflow](@ref faq-integer-arithmetic).
361+
- Complex numbers are supported, but to get complex results, [you need complex inputs](@ref faq-domain-errors).
362+
- There are multiple Complex and Rational types, with different component types.
357363

358364
- 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).
359365

0 commit comments

Comments
 (0)