Should you use RUST as your FIRST programming language?

Prime Rants
1 Oct 202206:28

Summary

TLDRВ этом видео обсуждается, стоит ли начинать программирование с языка Rust. Мнения разделяются: одни считают, что Rust слишком сложен для новичков и может демотивировать, а другие утверждают, что он поможет избежать плохих привычек, которые возникают при изучении более простых языков. Автор советует не начинать с Rust, поскольку интерфейс командной строки ограничивает визуальную обратную связь, которая важна для мотивации новичков. Лучше начать с JavaScript, HTML и CSS, которые позволят быстрее увидеть результаты и получать удовольствие от процесса обучения.

Takeaways

  • 🤔 Rust слишком сложен для начинающих из-за своей системы заимствования и проверки изменяемости переменных.
  • 🛑 Проблема других языков, таких как JavaScript, в том, что они позволяют изменять объекты в неожиданных местах, что может привести к ошибкам.
  • 🔄 В Rust отсутствует явление null, что помогает избежать определенных ошибок, хотя это может быть сложным для понимания новичкам.
  • 📉 Использование Rust может демотивировать новичков, так как им сложно увидеть быстрые результаты своей работы.
  • 💻 Rust в основном ограничивается работой через командную строку, что может быть неудобно для новичков, привыкших к графическим интерфейсам.
  • 📈 Новичкам лучше начать с JavaScript, HTML и CSS, так как это даст им видимый результат и быстрее поддержит интерес к программированию.
  • 📚 После изучения основ с JavaScript, можно перейти к более сложным языкам, таким как Rust, чтобы углубить свои знания.
  • 🚀 Rust действительно помогает писать более безопасный и производительный код, но для этого нужно уже иметь некоторые навыки программирования.
  • ⚙️ Программисты, которые начинают с Rust, могут избежать плохих привычек, связанных с управлением памятью, но это не стоит потери мотивации у новичков.
  • 🎮 Важно поддерживать интерес к программированию, чтобы не потерять желание учиться. Rust, хотя и мощный, может оказаться слишком сложным на начальном этапе.

Q & A

  • Почему не стоит начинать изучение программирования с языка Rust?

    -Rust считается очень сложным языком, и новичок может столкнуться с трудностями, которые приведут к разочарованию и невозможности продолжать обучение.

  • Какие «плохие привычки» можно приобрести, начиная с других языков программирования, а не с Rust?

    -Основные «плохие привычки» — это свобода изменения переменных в других языках, что может привести к неожиданным изменениям данных и ошибкам, а также отсутствие контроля над заимствованием данных.

  • Какую роль играет Borrow Checker в Rust?

    -Borrow Checker не позволяет просто передавать любые данные кому угодно для изменения, что уменьшает количество изменений в программе и делает их более явными, что ведет к снижению числа ошибок.

  • Почему неконтролируемое изменение объектов может привести к ошибкам?

    -В языках, таких как JavaScript, объекты могут изменяться в любой момент, что может привести к неожиданным последствиям, если разработчик не предполагает, что объект изменяется.

  • Что лучше: учить Rust первым или другим языкам программирования?

    -Автор считает, что лучше начинать с более простого языка, так как это поможет избежать разочарования и даст возможность получать больше визуальных откликов, что важно для мотивации.

Outlines

00:00

🤔 Начинающим стоит ли учить Rust первым языком?

Автор рассказывает, что новичок задался вопросом, стоит ли начинать изучение программирования с Rust. В комментариях к этому вопросу выделяются два противоположных мнения: первое - Rust слишком сложен для первого языка, и это может вызвать разочарование и отпугнуть от программирования. Второе мнение - Rust поможет избежать плохих привычек, возникающих при изучении других языков. Особо отмечается работа с borrow checker, который уменьшает количество ошибок за счет строгого контроля доступа к переменным, что не позволяет их просто так изменять, как, например, в JavaScript.

05:00

💡 Почему Rust полезен, но не лучший выбор для новичков

Автор продолжает обсуждение темы плохих привычек в программировании, в частности упоминая null как потенциальную проблему. В Rust null обрабатывается иначе, что снижает вероятность ошибок. Однако автор не рекомендует Rust как первый язык не по техническим причинам, а потому что новичкам будет сложно учить программирование, не видя результатов работы сразу. Работая с Rust, начинающие будут больше времени проводить в командной строке, что может лишить их мотивации. Для первых шагов лучше выбрать языки вроде JavaScript, где можно визуально наблюдать изменения в браузере.

Mindmap

Keywords

💡Rust

Rust — это современный язык программирования, известный своей высокой производительностью и безопасностью. В видео Rust рассматривается как сложный язык для новичков, так как его функциональность, такая как borrow checker, требует глубокого понимания концепций управления памятью, что может отпугнуть начинающих программистов.

💡Borrow Checker

Borrow Checker — это механизм в Rust, который обеспечивает строгий контроль за владением и заимствованием данных в программах. В видео объясняется, что этот механизм помогает избегать ошибок и снижает количество багов, но для новичков он может быть сложным для освоения, так как требует точного понимания, где и как данные могут изменяться.

💡Null

Null — это концепция в программировании, означающая отсутствие значения. В видео обсуждается, как Rust предлагает другой подход к работе с null, используя типы, которые требуют явного учета возможного отсутствия значения. Это помогает избегать неожиданных ошибок, в отличие от некоторых других языков, где null может быть причиной багов.

💡JavaScript

JavaScript — один из наиболее популярных языков программирования для веб-разработки. В видео JavaScript рассматривается как более легкий язык для начала обучения программированию по сравнению с Rust, так как его проще освоить и он предоставляет визуальную обратную связь при разработке веб-страниц.

💡Command Line

Command Line (командная строка) — это текстовый интерфейс для взаимодействия с операционной системой. В видео отмечается, что программирование на Rust часто связано с использованием командной строки, что может быть трудным для новичков, привыкших к графическим интерфейсам Windows или Mac.

💡Feedback

Feedback (обратная связь) в программировании — это возможность быстро видеть результаты своих действий. В видео говорится, что при использовании таких языков, как JavaScript, новички получают визуальную обратную связь, которая помогает поддерживать мотивацию и прогресс, в то время как Rust предоставляет меньше такой обратной связи, особенно при работе через командную строку.

💡Bad habits

Bad habits (плохие привычки) в контексте видео — это ошибки, которые программисты могут усвоить, начиная с языков с менее строгими правилами управления памятью и структурой данных, как JavaScript. В видео утверждается, что программирование на Rust может предотвратить возникновение таких плохих привычек благодаря строгим ограничениям, таким как borrow checker.

💡Ecosystem

Ecosystem (экосистема) — это совокупность инструментов, библиотек и сообществ, поддерживающих язык программирования. В видео JavaScript критикуется за «ужасную экосистему» по сравнению с Rust, так как у него часто возникают проблемы с совместимостью и отсутствием строгой типизации.

💡Foundational knowledge

Foundational knowledge (базовые знания) — это основные концепции программирования, такие как структуры данных и алгоритмы, которые необходимы для понимания более сложных тем. В видео говорится, что начинающим программистам легче будет освоить базовые знания на более простых языках, таких как JavaScript, прежде чем переходить на более сложные, такие как Rust.

💡Dopamine hits

Dopamine hits (дофаминовые импульсы) — это чувство удовлетворения и мотивации, которое человек получает от видимых результатов своей работы. В видео утверждается, что начинающие программисты, видя быстрые результаты своих действий в JavaScript, испытывают больше таких «дофаминовых импульсов», что помогает им продолжать обучение.

Highlights

The debate around starting with Rust as a first programming language focuses on two key perspectives: the difficulty of Rust versus avoiding bad habits from other languages.

Rust's borrow checker prevents arbitrary mutations of variables, which reduces bugs and enforces more explicit programming practices.

Mutability issues in languages like JavaScript can lead to unexpected behavior, making Rust's stricter approach beneficial in reducing bugs.

The concept of 'null' is discussed extensively, and while Rust handles it differently, the existence of 'null' is a universal programming consideration.

Rust might not be the best first programming language for beginners due to its complexity and the lack of immediate, visual feedback typical of more accessible environments like JavaScript and web development.

The speaker prefers Rust's handling of null and the borrow checker but still recommends starting with a simpler language for beginners.

Beginners are more likely to be familiar with graphical interfaces and need immediate feedback, which Rust's command-line focus doesn't provide.

The importance of seeing tangible results early in learning, such as visual feedback from JavaScript and web development, helps maintain motivation.

Rust provides a more foundational knowledge, but starting with something simpler like JavaScript can make learning the basics more enjoyable.

The speaker advises learning Rust eventually, but only after grasping fundamental programming concepts through a simpler language.

JavaScript has a challenging ecosystem, and its lack of types can make learning difficult, but it provides valuable feedback that helps with learning.

The Rust community may be biased, and beginners should be cautious when taking advice from sources like online forums.

The speaker emphasizes the value of learning through practice and the importance of dopamine hits from seeing progress.

The difficulty of Rust can demoralize beginners and make it harder for them to stick with programming in the long term.

It's better to start with an easy-to-learn language that provides quick wins, and then move on to more complex languages like Rust to build on that foundation.

Transcripts

play00:00

so my phone notified me yesterday about

play00:02

this topic right here this person's new

play00:04

to programming and wondering should they

play00:07

start with rust now if you read through

play00:09

literally just the massive amount of

play00:11

comments that is this thread in

play00:13

everyone's opinion it really comes down

play00:15

to two things one know you shouldn't use

play00:18

rust first because hey it's a really

play00:21

hard language and being super hard you

play00:24

may end up kind of being discouraged you

play00:26

may not be able to progress you may find

play00:29

that it's too hard to learn programming

play00:31

and kind of have like a weird view of

play00:32

what programming is or B yes you should

play00:35

because if you don't you're going to

play00:36

pick up bad habits from other languages

play00:39

which if you have bad habits you know

play00:41

what you can't do you can't go blazingly

play00:43

fast so first what are these bad habits

play00:46

that they're talking about as far as I

play00:48

can tell there's a couple things that

play00:49

they're considering as bad habits one

play00:51

the borrow Checker in Rust does not

play00:54

allow you to Simply pass anything around

play00:57

to anybody to allow anybody to be able

play00:59

to mute ha variables which is a really

play01:01

good thing if you think about it it

play01:03

reduces the amount of change that

play01:05

happens in a program and makes you be

play01:07

very explicit about where things will

play01:09

change now this does just simply lead to

play01:12

less bugs cuz often when you're using

play01:14

something like JavaScript anybody can M

play01:16

mutate anything anywhere so you could

play01:18

have an object in which you pass into a

play01:20

function it actually gets mutated and

play01:22

you don't think you're mutating it that

play01:24

could end up biting you in the ass right

play01:26

like you may not realize that you're

play01:28

actually mutating something and so it's

play01:30

always really good to remember and

play01:31

there's tons of edge cases to this so I

play01:33

totally get that is that a bad habit or

play01:36

just an allowance to the language right

play01:39

second there's this whole idea of null

play01:41

null appears so many times in this

play01:43

thread about oh man it's terrible

play01:45

because of how they handle null it makes

play01:46

you have bad habits the reality is is

play01:49

that whether you're using rust or some

play01:51

other language you still think about

play01:53

null you just think about it differently

play01:55

so that argument kind of sucks and if

play01:58

you're new to programming and none of

play01:59

that makes any sense it will once you

play02:02

understand null means nothing and you

play02:04

have to have nothing cuz sometimes

play02:06

there's nothing and if you access

play02:07

nothing something happens that's usually

play02:09

really really bad I think that makes

play02:11

perfect sense when you think about it

play02:13

you know so should you learn rust as

play02:15

your first programming language and

play02:17

become blazingly fast I'm going to go

play02:20

with no but my reason isn't technical

play02:22

yes I think the borrow Checker is a

play02:24

superior way to program I do think it

play02:26

leads to less bugs I do prefer the way

play02:29

you hand handled null in Rust yes but I

play02:32

do not think it's a great first language

play02:34

and the reason being is that with rust

play02:36

you're going to be pretty much kind of

play02:38

confined to the command line and the

play02:40

average person coming into programming

play02:42

has probably either used windows or

play02:44

maybe Mac sipping on some phills coffee

play02:47

surfing the internet on a two times more

play02:49

expensive device feeling better than you

play02:51

of course because they are better than

play02:52

you I mean it's an M1 dog if you're new

play02:56

to programming you're probably not used

play02:57

to just being on the command line now I

play02:59

know know there is that rare individual

play03:01

who probably will make a comment right

play03:02

now you go ahead make the comment oh

play03:05

actually I started off on the command

play03:06

line so I feel very comfortable with it

play03:08

yeah I get it okay thank you for that

play03:10

why don't you just subscribe to my

play03:11

channel now okay yeah you too you who

play03:13

didn't start on the command line also

play03:15

subscribe right now and then like the

play03:16

video I don't why do I have to tell you

play03:18

this why it makes no sense and so you

play03:20

don't get a lot of feedback when you use

play03:22

the command line yes you can print

play03:23

something ooh it's beautiful you could

play03:25

build a Tui exceptionally complicated or

play03:28

you can just start with JavaScript HTML

play03:30

and CSS and see something happen in the

play03:32

browser you can move these little

play03:33

Triangles around everywhere and go wow

play03:35

this looks so amazing and you can

play03:37

actually feel what you're programming

play03:39

you can see it and it will make you more

play03:41

excited for programming because

play03:42

ultimately I think the goal is for you

play03:44

to learn programming it's well really

play03:47

it's probably for you to get a really

play03:48

awesome job sip some Phil's Coffee and

play03:50

use that M1 MacBook but for that to

play03:52

happen you have to feel like you're

play03:54

making progress you have to see things

play03:56

change you have to have fun if you

play03:59

cannot categorically be entertained

play04:01

while learning programming I do think

play04:03

it's a very hard thing to pick up it

play04:06

just is now are you going to come out

play04:08

with the most foundational knowledge

play04:10

ever no but if you understand the basic

play04:13

constructs of programming learning those

play04:15

more foundational topics will become

play04:17

easier and easier so don't stop at

play04:21

JavaScript go ahead learn rust go learn

play04:23

data structures and algorithms

play04:25

understand Network programming

play04:27

understand devops take your time to

play04:30

learn about all these different parts of

play04:32

programming cuz it's going to benefit

play04:33

you a bunch but if you're getting

play04:35

started start with something that is

play04:38

going to be the easiest to learn all

play04:39

right this whole idea of learning rust

play04:41

for sure yeah you're right you're going

play04:43

to understand the borrow Checker faster

play04:45

but are you going to stick with

play04:46

programming I bet you won't stick with

play04:49

programming as long you'll be more

play04:51

morally defeated and you'll see less

play04:53

things so it get less those dopamine

play04:54

hits It's just terrible now I get it

play04:57

JavaScript has a terrible

play05:00

ecosystem JavaScript by itself non-

play05:02

typescript doesn't even have types so

play05:04

it's really really hard to know what's

play05:07

happening but I tell you having feedback

play05:10

is an amazing amazing way to learn so

play05:13

don't feel bad you're not learning the

play05:15

most hottest most loved language it's

play05:17

hard it's loved because people have

play05:20

programmed in these terrible

play05:21

environments and then once they know how

play05:23

to program they program in Rust and go

play05:25

wow that is actually much better I just

play05:28

thought it was a bunch of Tech Bros

play05:30

chest bumping and the next thing you

play05:31

know it's actually not it actually is

play05:34

good so heed my warning don't listen to

play05:36

r/ rust okay they are biased they are

play05:39

probably going to lead you down the

play05:41

wrong path listen to me my opinions are

play05:44

amazing okay I have a I have paint

play05:46

behind me okay you know that I'm telling

play05:49

you the truth I can say that right

play05:51

legally speaking you don't give legal

play05:52

advice what kind of HR is this hey thank

play05:54

you for watching a couple quick things

play05:56

please listen Hey listen one do you like

play05:58

this kind of stuff this more topical

play05:59

talking about things that are just kind

play06:01

of popping up on Reddit out in the

play06:03

newsfeed if you like that make a comment

play06:04

down below like the video send me the

play06:08

algorithmic signals people two I've been

play06:10

streaming on YouTube how do you feel

play06:11

about that huh you like it do you like

play06:13

the live streaming on YouTube I think

play06:15

you do third get in the Discord the

play06:18

name is the primagen so subscribe just

play06:21

hit the sub button what the what the

play06:23

hell why do I had to say this I hate

play06:25

saying that just do it already

Rate This

5.0 / 5 (0 votes)

Ähnliche Tags
программированиеRustновичкисоветыJavaScriptошибкиобучениекомандная строкамотивациялучшие практики
Benötigen Sie eine Zusammenfassung auf Englisch?