re: Java is too old, What should you learn in 2018? VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Coming back to ‘language’ as a metaphor, Kotlin might allow you to build concise sentences, but does not mean that it therefore allows you to bette...
 

To me concise code always reduces the cognitive load especially during reading. You make an interesting point, but an example would help to better understand.

For e.g a code that is more concise in Kotlin but requires more cognitive load and same thing implemented in another language which is very expressive with a less cognitive load.

 

The only thing that really reduces cognitive load is less logic, while 'concise' very often tends to be an alias for 'dense', which is perhaps fun to write but terrible when it comes to maintainability. As to an example, Kotlin builds on top of java (bytecode) and as such adds concepts, which in turn add cognitive load, unless the new concepts can entirely replace more complicated old concepts (a good example of that is fat arrow functions in JS, which avoid the 'this' confusion).

As a very easy example of how extended vocabulary only adds cognitive load, I'm going to going to borrow from Ruby (sorry, guys): array.second requires you to know about and keep in mind the different variations that exist (and don't exist) in this form, while array[x] can do exactly the same at a fraction of the vocabulary.

I do agree that extra vocabulary can be beneficial, but legion people have a proclivity to extol the efficacy and delectableness of a prodigious and uncurbed patois ... at the cost of clear and straightforward language. If you know what I mean :).

edit: since I forgot to specifically answer the following

same thing implemented in another language which is very expressive with a less cognitive load.

keep in mind that it's not just a matter of implementing with less code. It also relates to having to know about the syntax concepts. There are a fair number of languages that can be very expressive indeed, if you know lots of the concepts of that language (a monad is a monoid in the category of endofunctors, and so on and so forth).

legion people have a proclivity to extol the efficacy and delectableness of a prodigious and uncurbed patois

I know some of these words

If that's what you got from that purposely difficult sentence then great. But using a thesaurus works just as well though ;)

code of conduct - report abuse