Should you use RUST as your FIRST programming language?
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
🤔 Начинающим стоит ли учить Rust первым языком?
Автор рассказывает, что новичок задался вопросом, стоит ли начинать изучение программирования с Rust. В комментариях к этому вопросу выделяются два противоположных мнения: первое - Rust слишком сложен для первого языка, и это может вызвать разочарование и отпугнуть от программирования. Второе мнение - Rust поможет избежать плохих привычек, возникающих при изучении других языков. Особо отмечается работа с borrow checker, который уменьшает количество ошибок за счет строгого контроля доступа к переменным, что не позволяет их просто так изменять, как, например, в JavaScript.
💡 Почему Rust полезен, но не лучший выбор для новичков
Автор продолжает обсуждение темы плохих привычек в программировании, в частности упоминая null как потенциальную проблему. В Rust null обрабатывается иначе, что снижает вероятность ошибок. Однако автор не рекомендует Rust как первый язык не по техническим причинам, а потому что новичкам будет сложно учить программирование, не видя результатов работы сразу. Работая с Rust, начинающие будут больше времени проводить в командной строке, что может лишить их мотивации. Для первых шагов лучше выбрать языки вроде JavaScript, где можно визуально наблюдать изменения в браузере.
Mindmap
Keywords
💡Rust
💡Borrow Checker
💡Null
💡JavaScript
💡Command Line
💡Feedback
💡Bad habits
💡Ecosystem
💡Foundational knowledge
💡Dopamine hits
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
so my phone notified me yesterday about
this topic right here this person's new
to programming and wondering should they
start with rust now if you read through
literally just the massive amount of
comments that is this thread in
everyone's opinion it really comes down
to two things one know you shouldn't use
rust first because hey it's a really
hard language and being super hard you
may end up kind of being discouraged you
may not be able to progress you may find
that it's too hard to learn programming
and kind of have like a weird view of
what programming is or B yes you should
because if you don't you're going to
pick up bad habits from other languages
which if you have bad habits you know
what you can't do you can't go blazingly
fast so first what are these bad habits
that they're talking about as far as I
can tell there's a couple things that
they're considering as bad habits one
the borrow Checker in Rust does not
allow you to Simply pass anything around
to anybody to allow anybody to be able
to mute ha variables which is a really
good thing if you think about it it
reduces the amount of change that
happens in a program and makes you be
very explicit about where things will
change now this does just simply lead to
less bugs cuz often when you're using
something like JavaScript anybody can M
mutate anything anywhere so you could
have an object in which you pass into a
function it actually gets mutated and
you don't think you're mutating it that
could end up biting you in the ass right
like you may not realize that you're
actually mutating something and so it's
always really good to remember and
there's tons of edge cases to this so I
totally get that is that a bad habit or
just an allowance to the language right
second there's this whole idea of null
null appears so many times in this
thread about oh man it's terrible
because of how they handle null it makes
you have bad habits the reality is is
that whether you're using rust or some
other language you still think about
null you just think about it differently
so that argument kind of sucks and if
you're new to programming and none of
that makes any sense it will once you
understand null means nothing and you
have to have nothing cuz sometimes
there's nothing and if you access
nothing something happens that's usually
really really bad I think that makes
perfect sense when you think about it
you know so should you learn rust as
your first programming language and
become blazingly fast I'm going to go
with no but my reason isn't technical
yes I think the borrow Checker is a
superior way to program I do think it
leads to less bugs I do prefer the way
you hand handled null in Rust yes but I
do not think it's a great first language
and the reason being is that with rust
you're going to be pretty much kind of
confined to the command line and the
average person coming into programming
has probably either used windows or
maybe Mac sipping on some phills coffee
surfing the internet on a two times more
expensive device feeling better than you
of course because they are better than
you I mean it's an M1 dog if you're new
to programming you're probably not used
to just being on the command line now I
know know there is that rare individual
who probably will make a comment right
now you go ahead make the comment oh
actually I started off on the command
line so I feel very comfortable with it
yeah I get it okay thank you for that
why don't you just subscribe to my
channel now okay yeah you too you who
didn't start on the command line also
subscribe right now and then like the
video I don't why do I have to tell you
this why it makes no sense and so you
don't get a lot of feedback when you use
the command line yes you can print
something ooh it's beautiful you could
build a Tui exceptionally complicated or
you can just start with JavaScript HTML
and CSS and see something happen in the
browser you can move these little
Triangles around everywhere and go wow
this looks so amazing and you can
actually feel what you're programming
you can see it and it will make you more
excited for programming because
ultimately I think the goal is for you
to learn programming it's well really
it's probably for you to get a really
awesome job sip some Phil's Coffee and
use that M1 MacBook but for that to
happen you have to feel like you're
making progress you have to see things
change you have to have fun if you
cannot categorically be entertained
while learning programming I do think
it's a very hard thing to pick up it
just is now are you going to come out
with the most foundational knowledge
ever no but if you understand the basic
constructs of programming learning those
more foundational topics will become
easier and easier so don't stop at
JavaScript go ahead learn rust go learn
data structures and algorithms
understand Network programming
understand devops take your time to
learn about all these different parts of
programming cuz it's going to benefit
you a bunch but if you're getting
started start with something that is
going to be the easiest to learn all
right this whole idea of learning rust
for sure yeah you're right you're going
to understand the borrow Checker faster
but are you going to stick with
programming I bet you won't stick with
programming as long you'll be more
morally defeated and you'll see less
things so it get less those dopamine
hits It's just terrible now I get it
JavaScript has a terrible
ecosystem JavaScript by itself non-
typescript doesn't even have types so
it's really really hard to know what's
happening but I tell you having feedback
is an amazing amazing way to learn so
don't feel bad you're not learning the
most hottest most loved language it's
hard it's loved because people have
programmed in these terrible
environments and then once they know how
to program they program in Rust and go
wow that is actually much better I just
thought it was a bunch of Tech Bros
chest bumping and the next thing you
know it's actually not it actually is
good so heed my warning don't listen to
r/ rust okay they are biased they are
probably going to lead you down the
wrong path listen to me my opinions are
amazing okay I have a I have paint
behind me okay you know that I'm telling
you the truth I can say that right
legally speaking you don't give legal
advice what kind of HR is this hey thank
you for watching a couple quick things
please listen Hey listen one do you like
this kind of stuff this more topical
talking about things that are just kind
of popping up on Reddit out in the
newsfeed if you like that make a comment
down below like the video send me the
algorithmic signals people two I've been
streaming on YouTube how do you feel
about that huh you like it do you like
the live streaming on YouTube I think
you do third get in the Discord the
name is the primagen so subscribe just
hit the sub button what the what the
hell why do I had to say this I hate
saying that just do it already
Browse More Related Video
5.0 / 5 (0 votes)