Finished C? Level Up in OOP with Dart!

It felt like Dart has more similar syntax to C rather than Java or similar type languages such as C#, which a first-year fresher usually learns for getting familiar to OOP (Object Oriented Programming), after he has a basic knowledge of PoP (Procedural Programming Language).
All the conditionals, loops, variable declarations- they all followed the C structure, or JavaScript, you can tell. Has Class structure which is an upgrade from C. Has 2 operators for division (/, ~/); one for JavaScript way of number generation, another is C way of number generation (int). Regarding function, it is as flexible as the one of JavaScript. You can return a function, pass it as an argument of another function once that is called, or store inside a variable. There is also that arrow function feasibility which is a thing in JavaScript. Supports both Interface and Abstract class, which covers both Java and C++. One interesting thing that I found on Dart is the concept called 'Mixin'. It basically tells that you can use a method from another class without extending it directly but writing a simple word 'with'; basically, it overcomes the idea of Inheritance, which happens to be one of the four (or 5?) pillars of OOP. Last but not the least, really liked the constructor init in Dart. Literally in one single line, instead of a code-block like any other language.
Usually, it seems that many first-year students who just started walking on the ground of programming, find it struggling to get that public static void main(String args[])
syntax. So it'd be better for the instructors if they introduce Dart as a primary language for OOP in front of the students. Often freshers/newbie CS students have a tendency to make mobile apps; Dart has a well-structured framework for that, which is called Flutter. Also it reduces the tendency of all students going for one single trend which is Web App. Food for thought.
References:
- https://kishoremongar.hashnode.dev/dart
- https://dev.to/avinashchandan12/dart-vs-c-its-interesting-1784
Subscribe to my newsletter
Read articles from Fattah Mahmud Nihal directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
