Why the Patent System Inhibits Innovation Today Some Reasons to Use flat files over XML
Mar 01

Abstraction on your “Code View”

Tech Add comments

There is another war of the braces happening on the Groovy side of the house. It revolves around the need to have:

something.foo { ….. block

and not allowing:

something.foo

{ ….. block

I think that you should be able to use what you want. I also wish that we could get past some of the style issues. This always brings me back to the idea of having an IDE which shows code in “your view” of the world.

We can do that in a poor way:

  • Always convert from other format to YOUR FORMAT when you open a file
  • Always convert from YOUR FORMAT to ProjectStandard when you save a file

However, that is hokey. It would be nice to not really do the conversions. There would be one ’standard’ format which could be a project/company standard… but in fact it wouldn’t matter as you would never see it (other than via ‘vi’). The IDE would do the conversion on the fly, yet on disk it would look different. This abstract will of course come at a price (hard to implement… “look at line 5″… etc.).

However, I still wish that the New IDE could do items like this. It would fit into “Those who coded also coded”, and collaborative coding, and much more. You would have your ‘preferences’ and whenever you look at code (e.g. in a web page) a ghoul would come along and make it look nice for your eyes.

Maybe you could even say ‘hide the damn ; or at least put them in with tiny font’ :)

One Response to “Abstraction on your “Code View””

  1. Jerome Says:

    I don’t quite agree, that the IDE (or a ghoul) should make things “pretty for me”.

    Here is why:

    In some cases there is no ghoul or IDE available. I read a lot of books. Just when I need it most (when I try to learn something new), I also have to worry about strange looking code. The same applies for magazines.

    In other cases the wrong ghoul or IDE is at work, for example when I try to find a bug together with a colleague on his machine.

    That’s why I really like the following idea:

    http://www.artima.com/weblogs/viewpost.jsp?thread=74230

    Specify where things have to go and you’ll have the discussion only once (when the language is designed).

    I think it would be good for Groovy to allow only one style. Nobody would be serverely limited by either choice.

Leave a Reply

Spam is a pain, I am sorry to have to do this to you, but can you answer the question below?

Q: Type in the word 'ajax'