Monday, February 17, 2014

Java Noun Land


I was reading Steve Yegge’s post about Java Noun land. I was unable to comment in his post, I guess it’s too old, I’m too old or whatever.

I understand what he was talking about, I think the point was missed.

When taking out the garbage, their could be two approaches.

The User could have a function called User.TakeOut(garbage gc)

The Garbage could know how to remove itself Garbage.TakeOutBy(User u)

Or their could be an abstract function called Util.TakeOut (Doer do, Doee on)

This could then be utilized by any item wanting to be taken out, you could build a Utils library of verbs. Java core developers were afraid this would be too hard to maintain on large projects with novice programmers I think. So what they did was come up with Generics. Generics allows one to Write User.TakeOut<T>(T toremove) but the verb still belongs to User.

I see the point. We all do:

We all have Common modules, that include utility functions, very hard to attach to verbs. Stringutils class with static methods that are “kind” built for strings.

but a string is an array , so maybe Find<T[]>(T what) is more fitting to be put in ArrayUtils?

This is a conceptual decision and I have had to face them all my development life.(but since I have been programming since age of 13,14 I guess one can say my entire life)

C# has been using Delegates and Lambda, anonymous function etc. for a few versions now and I think for the optimal methodology it is the les rigid (Java guys don’t kill me here) of the languages.


I am currently researching NodeJS and IMHO C# could implement a working NodeJS architecture in its sleep with one hand tied behind its back. But would it be as efficient?

I don’t know….

What I like about C# is not the language somuch as the frameworks and stuff that I can just “use”. I hope the require modules willl be just as good in NodeJS.

Continuing with my research now. good day