Quantcast
Channel: JetBrains Developer Community : Thread List - IntelliJ IDEA Users
Viewing all articles
Browse latest Browse all 5661

end markers

$
0
0

Eyeball Blocking

 

One of my big complaints with the Java computer language is you can’t

tell where some source code group ends without a detailed analysis of

every {} inside the group. The } is overloaded for so many purposes.

Is each inside a comment or String or char literal? If so, it

does not count in balancing. The eye cannot analyse such complicated

and deep nesting. You must to use a code-tidying tool to indent, which

the eye can understand, but often the indentation and {} nesting are

out of sync, at the very time you need the indentation most — when the

{} are unbalanced.

 

I hope some day the IDE (Integrated Development Environment) will mark

the ends of ifs, loops, methods, classes… with some subtle but

distinct visual clue in addition to indentation.

 

Possibilities:

 

sizes of {} {} {} {} {}, with bigger pairs on outer blocks.

colours of {}.

synthetic comments e.g.

// end method isReady

// endif

// end for int i

// end class Bonsai

These synthetic comments are not really in the code, and the text

shows in pale grey. You don’t even have to include the //.

icons: if icon loop icon When you configure them as small as a small

as a single letter, they still should be distinct, mainly via colour

than shape.

 

Later on today I will upload a formatted version of this post to

http://mindprod.com/

--

Roedy Green Canadian Mind Products http://mindprod.com

Computers are like Old Testament gods; lots of rules and no mercy.

~ Joseph Campbell (born: 1904-03-26 died: 1987-10-31 at age: 83)

 


Viewing all articles
Browse latest Browse all 5661

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>