Groups | Search | Server Info | Keyboard shortcuts | Login | Register


Groups > pt.comp.programacao > #204

Re: sobre NIL

From Patricia Ferreira <pferreira@example.com>
Newsgroups pt.comp.programacao
Subject Re: sobre NIL
Date 2024-01-28 22:18 -0300
Organization A noiseless patient Spider
Message-ID <87plxlorqv.fsf@ic.ufrj.br> (permalink)
References <875xzezi84.fsf@example.com> <87le89zjnf.fsf@brilhante.top> <87bk95zd0d.fsf@example.com> <87h6ixz7gb.fsf@brilhante.top>

Show all headers | View raw


Daniel Cerqueira <dan.list@brilhante.top> writes:

> Patricia Ferreira <pferreira@example.com> writes:
>
>> Daniel Cerqueira <dan.list@brilhante.top> writes:
>>
>>> Patricia Ferreira <pferreira@example.com> writes:
>>>
>>>> E aí, Daniel?  Qual seu relato da opinião-comp.lang.lisp sobre NIL? :-)
>>>
>>> Gostei das respostas do Madhu, Kaz, e Raymond (acho que é assim o nome
>>> dele). Gostei especialmente da simplicidade da resposta do Madhu. E
>>> também pelo fato de ser uma aborgadem mais pragmática. Foi um ponto de
>>> vista que eu ainda não tinha pensado. (já lhe agradeci.)
>>
>> Você escreve C?  Já implementou listas encadeadas?  Você vai ver o NIL
>> por lá.  É essencialmente a mesma coisa.  Pode ser implementado de outra
>> forma?  Com certeza, mas o mais óbvio é usar o NULL de C mesmo.
>
> Sim, entendo. O NIL de CL é parecido ao NULL de C.
>
> No entanto, há que realçar que Common Lisp e C são duas línguas muito
> distintas. São paradigmas diferentes.
>
> ;-)

Ah, que isso---são idênticas.  Qualquer um que sabe escrever um
hello-world percebe.

#include <stdio.h>
int main(void) {
  printf("Hello, world.\n");
  return 0;
}

%./hello
Hello, world.

#+include <stdio.h>
(defun main (int void)
  (format t "Hello, world.~%");
  (return-from main 0);
)

(main 'int 'void)

%sbcl --script c.lisp 
Hello, world.

:-)

Back to pt.comp.programacao | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

sobre NIL Patricia Ferreira <pferreira@example.com> - 2024-01-27 16:31 -0300
  Re: sobre NIL Daniel Cerqueira <dan.list@brilhante.top> - 2024-01-28 13:12 +0000
    Re: sobre NIL Patricia Ferreira <pferreira@example.com> - 2024-01-28 12:36 -0300
      Re: sobre NIL Daniel Cerqueira <dan.list@brilhante.top> - 2024-01-28 17:36 +0000
        Re: sobre NIL Patricia Ferreira <pferreira@example.com> - 2024-01-28 22:18 -0300
          Re: sobre NIL Daniel Cerqueira <dan.list@brilhante.top> - 2024-01-29 12:19 +0000
            Re: sobre NIL Patricia Ferreira <pferreira@example.com> - 2024-01-29 11:17 -0300
              Re: sobre NIL Daniel Cerqueira <dan.list@brilhante.top> - 2024-01-29 20:53 +0000
                Re: sobre NIL Patricia Ferreira <pferreira@example.com> - 2024-01-29 20:19 -0300
    Re: sobre NIL Patricia Ferreira <pferreira@example.com> - 2024-01-28 12:54 -0300
      Re: sobre NIL Daniel Cerqueira <dan.list@brilhante.top> - 2024-01-28 17:46 +0000
        Re: sobre NIL Patricia Ferreira <pferreira@example.com> - 2024-01-28 22:23 -0300
      Re: sobre NIL Patricia Ferreira <pferreira@example.com> - 2024-01-29 11:32 -0300
        Re: sobre NIL Daniel Cerqueira <dan.list@brilhante.top> - 2024-01-29 20:53 +0000

csiph-web