Common Lisp: defvar vs defparameter

  Рет қаралды 307

The Lisper

The Lisper

5 ай бұрын

Global variable in Lisp are special, why? Good question! In Common Lisp you can declaare global variables using both `defparameter` and `defvar`, the difference between them is strictly connected with the interactive nature of Lisp.

Пікірлер: 6
@ErikNorlander-go1zv
@ErikNorlander-go1zv 4 ай бұрын
Happy I found your channel, great content on CL, thank you very much!
@the-lisper
@the-lisper 4 ай бұрын
Thanks for the nice comment!
@RicardoBigEggs
@RicardoBigEggs Ай бұрын
As someone currently starting with CL, this is very useful. Thanks a lot!
@the-lisper
@the-lisper Ай бұрын
Thanks for the feedback!
@RamsesAldama
@RamsesAldama 5 ай бұрын
It is kind of confusing. Because first you said that with defvar you cannot reassign a new value if it already have a value but then in the relp you were able to assign a new value to a defvar that already had a value. Could you explain a little bit further. Thanks.
@the-lisper
@the-lisper 5 ай бұрын
At the beginning when I reassign with defvar and defparameter to show that in one case the value doesn't change while in the other it does, they are two different shell. In the end, when I can reassign the value with defvar, I use mkunbound before. defvar doesn't throw errors, but the new value is ignored if there is already one
Series: A Functional Approach To Common Lisp
5:56
The Lisper
Рет қаралды 591
7 Functional Programming Techniques EVERY Developer Should Know
21:35
Beautiful gymnastics 😍☺️
00:15
Lexa_Merin
Рет қаралды 15 МЛН
How Many Balloons Does It Take To Fly?
00:18
MrBeast
Рет қаралды 184 МЛН
WHAT’S THAT?
00:27
Natan por Aí
Рет қаралды 14 МЛН
Spot The Fake Animal For $10,000
00:40
MrBeast
Рет қаралды 164 МЛН
Miller indices 05 - Determine the directions
6:06
Midecali Engineer
Рет қаралды 6
Little bits of Lisp - defvar, defparameter & defconstant
8:38
Enums considered harmful
9:23
Matt Pocock
Рет қаралды 199 М.
Kandria - A Game in Common Lisp
26:36
European Lisp Symposium
Рет қаралды 2,1 М.
The Rise & Fall of LISP - Too Good For The Rest Of the World
17:44
Gavin Freeborn
Рет қаралды 38 М.
Global Variables in C++... not as easy as it seems
18:25
The Cherno
Рет қаралды 61 М.
From Clack to Ningle passing through Lack (Common Lisp)
7:25
Little bits of Lisp - case
5:25
Baggers
Рет қаралды 1,2 М.
Functions vs Classes: When to Use Which and Why?
10:49
ArjanCodes
Рет қаралды 148 М.
iPhone 15 Pro в реальной жизни
24:07
HUDAKOV
Рет қаралды 452 М.
$1 vs $100,000 Slow Motion Camera!
0:44
Hafu Go
Рет қаралды 27 МЛН
НЕ БЕРУ APPLE VISION PRO!
0:37
ТЕСЛЕР
Рет қаралды 333 М.
Battery  low 🔋 🪫
0:10
dednahype
Рет қаралды 13 МЛН
1$ vs 500$ ВИРТУАЛЬНАЯ РЕАЛЬНОСТЬ !
23:20
GoldenBurst
Рет қаралды 1,9 МЛН