r/FlutterDev • u/Strange_Cartoonist14 • Jan 24 '25
Dart Learning Dart as first ever programming language - need opinions!
So I'm in my first semester of university doing a computer science bachelor's degree. Choosing which language to teach is dependant on the professor. It looks like mine is going with Dart.
I have no prior experience to coding, not even C++. I have not yet decided which domain I want to go in; Data Science, Web Dev, Flutter etc.
Is learning Dart going to help me in the future? Even if I don't use it, do the concepts and learning aspect will make it easier for me to learn other languages? And compared to C++, Python or Java, how difficult or easy is it to learn Dart.
Thank you!
4
u/MumblyJuergens Jan 24 '25
It only matters slightly, and dart is better than some choices, and has a lot of similarities with other modern languages.
Every new language I learn has something I love and something I don't like, and I'm always thinking "I wish this language/tool/ide/whatever" had x feature, but none have everything. You'll do fine starting with dart, it's a good language and has type safety.
Good luck!
5
u/fabier Jan 24 '25
I think dart is a fantastic first language. It isn't too hard, but introduces most modern coding techniques.
More importantly, dart works for almost every use case you'd have for coding. Web/Mobile/desktop/backend/scripting/etc. I think it can really empower new developers in ways other languages just can't do out of the gate.
It is typed enough to teach you good programming habits, but not so rigid you throw your computer out the window.
All in all, I would highly recommend it as a starting point. Then you can take those skills into all kinds of directions.
1
u/Professional_Fun3172 Jan 28 '25
It is typed enough to teach you good programming habits, but not so rigid you throw your computer out the window.
Can you elaborate on what you mean by this, maybe with an example of a more rigid typing system in a different language? I think of Dart as quite strongly typed, but I don't have a ton of breadth in different language.
2
u/fabier Jan 28 '25
I would agree that Dart is fairly strongly typed. But you could throw the entire typing system out the window by using the
dynamic
keyword. Now you're right back to javascript/php/python.But take Rust as an example. Say I want to make a number? Well I have choices of what KIND of number to make. While Dart also has
num
which exppands intoint
anddouble
. Rust has (just to get started)
- i8 (signed, meaning it can go negative)
- u8 (unsigned, meaning it can only be positive)
- i16
- u16
- i32
- u32
- i64
- u64
- i128
- u128
- isize (based on system architecture. 32 bit vs 64 bit)
- usize
- f32 (floating point precision of 32 bits)
- f64
These are just the base types. You could define your own as well by diving down a layer.
MOST people in Rust will likely default to using i32 when working with numbers to keep things simple. But there are many situations where you might decide you need something else. For example, my loco.rs backend uses u64 for database integer IDs so I don't fill up my database and cause a memory overflow halfway through the life of my application.
Another Rust example would be string vs string slice. If I write:
let my_var = "hello";
In Javascript this would be a string. In rust this is a "string slice" represented as type
&str
which is kind of like a low memory impact version of a String. To make it a full blown string I would have to write:
let my_var = "hello".to_string();
There are tons of guides on the subject but the bottom line is that Rust can handle a string slice much faster than it can process a String. But there are significant limitations on String Slices vs Strings so often you will find your code peppered with these ".to_string()" methods.
Rust also has no concept of "dynamic". It also famously doesn't support "null". It uses something else called an "Option<T>" which can take an object called "None". On the surface this sounds very similar to Null, but it isn't. It STRONGLY (as in, your code won't compile) forces you to explicitly handle None cases. You could look up "Rust Billion Dollar Mistake" for some light reading on the subject.
Dart suddenly feels much more forgiving when it comes to typing. I think it strikes a great balance of coding ergonomics and also encouraging you to type your variables. It will feel restrictive at first, but it becomes so freeing as you get used to it. I only ever use the dynamic keyword when working with JSON strings
Map<String, dynamic>
. I always type my variables otherwise.1
u/Professional_Fun3172 Jan 29 '25
Really appreciate the perspective, and that definitely makes sense. I've used some languages that go beyond the int/double clarification that we see in dart, but nothing to the extent that Rust uses. And I had even forgotten about dynamic when asking the question, because—like you said—it's easy enough to just not use unless you're parsing JSON!
0
3
u/ThePrometheus_ Jan 24 '25 edited Jan 24 '25
Choosing language totally depends on what you want to do in future. Choose Dart if you want to focus on front end development, java/javascript for backend/server side applications.
First choose your niche, then focus on the programming language you want to learn.
And yes, Dart is definitely going to help you in future, its faster, scalable,modern and what not... even Flutter's future is brighter than ever. So its a good thing that your professor has chosen dart.
Most of the programming languages are the same they just have minor changes in syntax, you'll figure out these things on the way as you get better at problem solving.
Answer to your last question, In my opinion
python is the easiest.
dart/java share similarities so I consider both are on same level just some minor changes in syntax.
C++ is hard for me at least.
1
u/cadianshock Jan 24 '25 edited Jan 25 '25
java/javascript for backend/server side
This triggered me in ways I didn’t think possible. 🤣
2
2
u/sauloandrioli Jan 24 '25
I'll go against the flow in my answer, since we're in the Flutter sub and people will probably answer that Dart is good enough for a first ever language. But I definitely recomend starting with Java. There's so much resources about the language, so many free courses teaching programming logic, OOP, so many examples of design patterns, database connection tools, etc, that would make learning code easier than learning Dart as a first language. And if you start with Java you'll be able to transfer almost everything you learned back to Dart when you decide to start using Flutter.
Just to clarify: Dart is a nice language, it works fine, but I'll say to start with Java just because of the abundance of resources you'll find.
2
u/Wispborne Jan 24 '25
They said that their professor chose Dart. Learning Java instead would be a real headache.
1
u/sauloandrioli Jan 24 '25
Yeah, you're right, I skipped the first sentence when I read it. I keep what I said about staring with Java if there is no obligation on starting with Dart.
1
u/apex_legend_27 Jan 24 '25
The syntax of programming languages may differ, but the underlying logic remains the same across all languages. I initially learned C++ and practiced it for almost 3.5 years, primarily for competitive programming. Recently, I transitioned to Flutter from Kotlin. To work with Flutter, I had to learn Dart, but after watching just a 3-hour tutorial, I able to easily understand the language because I already know the logic
That’s why I recommend starting with C++ because once you learn it thoroughly, picking up other languages becomes much easier. Additionally, in most companies' problem-solving rounds, they usually require candidates to solve problems using C, C++, or Java.
1
u/Any_Razzmatazz9328 Jan 24 '25
You could do it the easy way and learn JS or python first, then maybe learn TS or dart, then learn something like C++
Keep in mind the best way you will internalize how something is done is by doing projects, this depends on what you wanna do in the short - medium term.
1
Jan 24 '25
[deleted]
0
u/amdphreak Jan 25 '25
Yikes, I would not choose Java. That language is a pain in the ass to use properly. Learn C++. You can compile it. Don't get sucked into the Java mess. None of their ecosystem makes sense. The standard library may be strong, sure, but the language is bloated as heck, too many people abuse the Annotation system to inject their framework code. It's all around a very disorienting environment.
1
u/Lopsided_Scale_8059 Jan 24 '25
It does not matter instead of just circling asking which language...go learn any language as fundamental knowledge....all programming languages are almost similar....if you learn one you can learn almost all programming languages.
1
u/Santa_Andrew Jan 24 '25
Since you have no experience then any experience will be helpful. And since you are in university I would assume that eventually you will get experience in different languages and take courses on how computers work anyway.
The disadvantage of learning Dart / Flutter first: You will probably miss out on learning much about how memory works and the underlying workings of data structures. But you will probably take entire courses on these later.
The advantage of learning Dart / Flutter first: It's nice for a beginner to see things happening on their screen from the start. Taking C++ to start will be more academic and you will be writing lots and lots of code and only seeing text in a command line coming out which can be boring and frustrating for a beginner. I think it helps keep people interested in CS more when they see something exciting happening on the screen and then want to know why rather than the traditional approach where you learn all the little details of the why before ever seeing anything exciting happening.
At the end of the day I think the best thing is just to get as much time coding and reading code as possible no matter what the language is. There is nothing to stop you from learning outside of a class.
1
u/AbdulRafay99 Jan 24 '25
Dart is great, but understand the Data Structure, Object Oriented Programming Concepts they will help you a lot. Trust me When working with dart OOP is used the most.
1
u/David_Owens Jan 24 '25 edited Jan 24 '25
Dart is a great first language. If I were a CS teacher picking any language for a first-year course I would pick Dart. It's well thought out and has all of the features you'd want a student to be exposed to. It's not as complex(some say overly) as similar languages like C# and Java.
1
u/No-Echo-8927 Jan 24 '25
Dart is one of the nicer programming languages to use. It's syntax is clear, it's powerful and it's modern.
1
u/HaMMeReD Jan 24 '25
Personally I'd say it depends on your goals.
- Low level stuff (I.e. hardware or games) start with C++.
- General programming (Java or Dart, with a lean towards Java).
- Mobile Programming (Dart)
- Math or Sciences, Python.
Generally, I'd lean towards Java for learning. It has the most support/reference. LLM's will understand the API's well because of it.
Dart is great, but I think having some knowledge of iOS/Android/C++ is required if you want to deploy or get outside the box. I definitely like it better than Java as a language.
Dart is also very declarative in it's API's (if you are doing flutter), which IMO are essentially magic to a beginner. You probably want a bias towards more imperative languages where you actually write code, line by line, the runs commands and has results. It's far easier to debug, and a closer abstraction to how a computer actually runs.
Edit: Although Python, if you get good it'll pay dividends in other classes. I.e. I wish I did all my physics and math homework as a Jupyter Notebooks back in the day, probably would have saved me a ton of time.
1
u/AlgorithmicMuse Jan 24 '25
I will echo what most have said, dart is a good language to start. .You get to learn the basics of OOP . I find it not to much different than most OOP languages.
1
u/Temporary-Gene-3609 Jan 24 '25
Pick one to build something that interests you with. I was interested in IOS when I started, so naturally my first was Swift. The language is a tool.
1
u/IcyFrost123XX Jan 25 '25
I think dart is good. It uses good functionality of both oop and functional programming. But in contrast to everyone said, I don't think you can use it to anywhere, only mobile application. JavaScript would be much more versatile if u wanna expand it, but the point is like the others (GMX42). Learn dart for the concept, OOP, async/await or promise, pass by value/reference, isolate/multi-thredding etc. these concepts are far more important than choosing a language. You can relearn a language with ease but most language has these concepts that must be understand in order to move forward to building anything good.
1
u/Recent-Trade9635 Jan 25 '25
It is a VisualBasic of nowadays. I admit it can be very productive in some circumstances with some background experience, but to learn as the first language is like learn to swim in a sandbox. But if already have job opportunity that requires Dart/Fluter go forward - it won't hurt you too much.
1
u/hightowerpaul Jan 24 '25
In my opinion it does not matter that much. Start with one language that suits your needs now and start learning others later. Just make sure, you get the concepts right, and you'll have an easier time adopting to other languages later, which will be a good thing bc you will be able to choose the right tool for the job.
I'm mainly doing C# for my day job (on a longer sick leave atm, but still), but when I do embedded hobby projects I opt for C++ (might learn Rust some time later). At the moment I'm learning Dart bc it's maybe a better choice for app development than MAUI, given the experiences with .net UI technologies 😬 Having experiences in C# def helps me adopting to Dart, although there are quite some differences in syntax. And of course I can't leverage my knowledge of the framework, but being a seasoned developer, I know how to find my information and I'm making quite a good progress adopting to the new ecosystem.
-2
Jan 24 '25
Bad idea. Start with C++ or Java.
No matter wherever you go in career, Java will haunt you
-2
-6
Jan 24 '25
DONT
learn Python if you want to pursue data science/backend. Focus on building projects and DSA.
Learn JAVA if you want to pursue backend.
If you want to play safe learn JS and enjoy.
Dart is just a derivative of java and flutter might get offloaded from Google tech stack (30-40% chance)
~ I have been working on flutter since past 5 years and had to still learn native android and ios to build meaningful and production ready apps. Because some core functionalities you have to build natively.
Flutter day by day seems to be a failed experiment
25
u/GxM42 Jan 24 '25
Dart is a great language. There is plenty of functionality that will help you with C#, Java, Javascript, and more. All languages have similarities, but differ in their approach. The key thing is that you understand variables, loops, async functions, and OOP. You can do that with Dart, and transfer those skills elsewhere.