Apathy is the suck. Login and vote now.
By carango@gmail.com
via refactorama.blogspot.com
Published: May 04 2008 / 10:32
Have you seen code examples from JavaFX script? The language is very interesting. It contains many new features that may revolutionize the way people create user interfaces in Swing, such as triggers and binding. But one thing that always bothers me about the code examples that I have seen is the insane amount of curly braces that they have to use.
Comments
signal9 replied ago:
I see what they were trying to do with the language. I am a fan of Erlang where the use of tuples {} and lists [] are heavily used. to be honest once you get the style down pat it becomes easy to learn.
The problem with the code you posted is that each new attribute is on a new line. this is what makes it difficult to understand.
For instance:
is alot easier to understand than:
Indentation can be a problem especially when its coupled with syntax that is supposed to group values. However indentation alone can also get confusing, especially when you are "n" levels deep:
Just my two cents.
,
aalmiray replied ago:
The problem is not exactly in the language per se, but that the examples shown so far promote bad programming, same as it happened in the earlier days of Swing (to this day people still run lengthy operations in the EDT). Sure you can use smarter indentation, question is why do people showing JFX do not use it?
Voters For This Link (5)
Voters Against This Link (3)