You are viewing a single comment's thread from:

RE: Extension Methods - The devious evils lurking in your code

"That is what pushed me away from OO, I like small self contained functions that I can test in a few lines, then plug them together." <=== Totally my goal

That's the thing with dependencies, they tend to grow. We have monolithic 'functions' in the smalltalk side of things that are incredibly complex but they can be simplified quite a bit after hours of going down the rabbit hole of code.

Smalltalk bills itself as the original OO language but the smalltalk code I've looked at is way to big. There are smalltalk methods that easily get to be 50-100 lines or more and each method calls a similar sized chunk of code.

Personally I think a single method should be able to be seen and understood with no details hidden and with very few dependencies(classes or other structures) and should be at most 20 lines of code. I think if a single method is longer than that then you probably aren't breaking it into small enough pieces.

Sort:  

I had similar a while back. A 3500 line VB6 function that I got down to 300 lines of tiny functions :)

Coin Marketplace

STEEM 0.19
TRX 0.17
JST 0.031
BTC 87896.22
ETH 3325.50
USDT 1.00
SBD 2.86