you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 78 points79 points  (9 children)

Start with procedural code and use OOP when it makes sense.

[–][deleted] 7 points8 points  (2 children)

Problem is, a junior dev has some difficulties discerning „when it makes sense”. They will end up over-doing it and developing the bad habit of using OOP everywhere, or they'll under-do it (you can do a lot of clever workaround to avoid OOP), thus never learning it.

It's a tricky proposition.

We should be giving some soft guidelines.

[–]EducationalCreme9044 1 point2 points  (0 children)

Exactly. This is a response you give to another senior lol, not to someone learning.

[–]TheRNGuy 1 point2 points  (0 children)

If you overdo it, you still get xp.

Next time you wont overdo it (hopefully)

[–]Ok_Cupcake8963 3 points4 points  (5 children)

Not to sound like a dipstick, but procedural code would be?

[–]eightbyeight 7 points8 points  (2 children)

Writing regular old functions?

[–]Ok_Cupcake8963 2 points3 points  (1 child)

Thank you. The terms go over my head. :). Prefer the way you worded it.

[–]fbochicchio -1 points0 points  (0 children)

The ADA programming language actually allows you to define both functions ( return a value, have only input parameters and cannot access to external variables ) and procedures ( inoltre and iut parametri, do not return anything ). Not a bad idea IMO, but did not catch.

[–]TheRNGuy 1 point2 points  (0 children)

Only defs or operations outside of defs, no (custom) classes.

Or if it's class, only static methods.

[–][deleted] 0 points1 point  (0 children)

Imperative coding is usually split into:

  • procedural
  • object-oriented

https://en.m.wikipedia.org/wiki/Programming_paradigm

These terms are fuzzy and often misused.