Nim for Beginners #24 Objects
Автор: Kiloneie
Загружено: 2020-08-11
Просмотров: 1462
Описание:
In this video i will teach you what Objects are how to use them, and compare them with very similar Tuples.
IMPORTANT NOTE: Since v2.0 you can now assign default values to fields of `objects`:
MyObject = object
data: string = "Some string"
name = "Yes this works too"
Version used: 1.2.4
Timestamps:
00:00 Intro
00:10 What are objects
00:47 Empty object declaration
01:11 Empty object declaration with initialization
01:29 Object initialization(with values)
01:52 Changing object's field values
02:30 'reset' proc for tuples and object
02:57 Object's field visibility
03:50 Object field uniqueness(that's my term for it)
06:17 'of' operator for objects
LINKS:
Patreon page: https://www.patreon.com/Kiloneie?fan_...
Code link(Tuples): https://play.nim-lang.org/#ix=2tSY
Code link(Objects): https://play.nim-lang.org/#ix=2tT1
Code link(hidden.nim module): https://play.nim-lang.org/#ix=2tSZ
Visual Studio Code Short Cuts: https://code.visualstudio.com/shortcu...
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: