Hacker News new | comments | show | ask | jobs | submit login
Ask HN: Any language that has syntactic support to highlight the main logic?
2 points by vidoss 1107 days ago | 2 comments
It beats me why almost all programming language has syntax for comments, but none of them have any syntax to show these are the lines that follow the main logic and every thing else is secondary.<p>If someone is looking at the code it is assumed he understands the syntax. what you really need is to suppress the noise for him to follow the main logic. This would work better than comments as most of the time the comments just repeats what the syntax says with an extra exclamation at the end.<p>If you like the idea pl. up vote. Hopefully new languages like "go" would jump on it.

Exceptions, Restartable Conditions, and Aspect Oriented Programming -- of which many existing programming languages have implementations of the last and at least one of the first two, sometimes as fundamental language syntax and sometimes as libraries building on more fundamental syntax -- are all means of clarifying the separation between the principal logic of a program and peripheral concerns. There's probably other existing techniques.

The goal is certainly worthwhile, but it'd be more interest to know what specifically you are looking for in this regard.


When I am reading someone else code I spend a lot of time figuring out a section of code only to realize its for some corner case. If only there is a hint thatz not the main logic will save lot of time. The fix everyone will immediately suggest is proper commenting which is clearly not working. I am just exploring alternatives.


Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact