[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Shrinking the C core
From: |
Eli Zaretskii |
Subject: |
Re: Shrinking the C core |
Date: |
Mon, 21 Aug 2023 15:22:45 +0300 |
> From: Ihor Radchenko <yantar92@posteo.net>
> Cc: ams@gnu.org, incal@dataswamp.org, emacs-devel@gnu.org
> Date: Mon, 21 Aug 2023 11:56:20 +0000
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> >> (let ((a 10))
> >> (setq a (+ a 100))
> >> (floor a nil))
> >>
> >> During compilation of the above code, the compiler will know that a is a
> >> positive integer.
> >
> > It will? What happens if a overflows?
>
> It will not, right? Because we do know all the values at compile time in
> the above example.
In toy programs, perhaps. But not in real life. We want to be able
to write real-life programs in Lisp, not just toy ones.
> > If you want to program in C or Fortran, then program in C or Fortran.
> > Lisp is an interpreted environment that traditionally includes safety
> > nets. People actually complain to us, and rightfully so, when Emacs
> > crashes or produces corrupted results instead if signaling an error
> > pointing out invalid input or other run-time problems.
>
> I did not mean to disable checks. I just meant that when the types and
> possibly value ranges are known at compile time, these checks can be
> safely omitted. Without compromising safety.
Not in ELisp, they cannot. Someone already explained why.
- Re: Add more supported primitives in libgccjit IR, (continued)
- Re: Shrinking the C core, Emanuel Berg, 2023/08/27
- Re: Shrinking the C core, Gregory Heytings, 2023/08/21
- Re: Shrinking the C core, Emanuel Berg, 2023/08/27
- Re: Shrinking the C core, Emanuel Berg, 2023/08/27
- Re: Shrinking the C core, Eli Zaretskii, 2023/08/21
- Re: Shrinking the C core, Ihor Radchenko, 2023/08/21
- Re: Shrinking the C core,
Eli Zaretskii <=
- Re: Shrinking the C core, Emanuel Berg, 2023/08/28
- Re: Shrinking the C core, Ihor Radchenko, 2023/08/28
- Re: Shrinking the C core, Alfred M. Szmidt, 2023/08/20
- Re: Shrinking the C core, Ihor Radchenko, 2023/08/20
- Re: Shrinking the C core, Alfred M. Szmidt, 2023/08/21
- Re: Shrinking the C core, Ihor Radchenko, 2023/08/21
- Re: Shrinking the C core, Alfred M. Szmidt, 2023/08/21
- Re: Shrinking the C core, Ihor Radchenko, 2023/08/21
- Re: Shrinking the C core, Alfred M. Szmidt, 2023/08/21
- Re: Shrinking the C core, Ihor Radchenko, 2023/08/21